-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC Document new CMSEditLink extension. #85
DOC Document new CMSEditLink extension. #85
Conversation
f931340
to
48ef5a2
Compare
991517a
to
353eff5
Compare
353eff5
to
2621b64
Compare
2621b64
to
be6cd68
Compare
|
||
When using this extension, your model must also declare its `cms_edit_owner` as a | ||
[configuration property](../configuration/configuration/#configuration-properties). The value must either be the class name of the | ||
`ModelAdmin` that directly manages the record, or the `has_one` relation for the record that this model is edited on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`ModelAdmin` that directly manages the record, or the `has_one` relation for the record that this model is edited on. | |
`ModelAdmin` that directly manages the record, or the `has_one` relation for the record that this model is edited on, which is often the parent DataObject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
## Getting an edit link | ||
|
||
To get a link for editing a record, other than some exceptions like `SiteTree`, you have historically had to generate the link mostly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to provide a historical background. The docs we provide are always for the latest version. Unfortunately we don't contain docs for older minor versions, though that's just a limitation of our documentation system, and not something we should attempt to handle here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
If the `cms_edit_owner` is a `has_one` relation, the class on the other end of the relation _must_ have | ||
a reciprocal `has_many` relation as documented in [Relations](./relations#has-many). For best results, use dot notation on the | ||
`has_many` relation. It must also implement a [getCMSEditLinkForManagedDataObject()](api:SilverStripe\Admin\CMSEditLinkExtension::getCMSEditLinkForManagedDataObject()) | ||
method. The easiest way to do that is for it to have `CMSEditLinkExtension` applied as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method. The easiest way to do that is for it to have `CMSEditLinkExtension` applied as well. | |
method. The easiest way to do that is for it to apply the `CMSEditLinkExtension` to the reciprocal class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
[hint] | ||
If the `cms_edit_owner` is in some vendor dependency that you don't control, you can always apply `CMSEditLinkExtension` | ||
and the `cms_edit_owner` via yaml. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the `cms_edit_owner` via yaml. | |
and the `cms_edit_owner` via yml. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
en/04_Changelogs/4.12.0.md
Outdated
|
||
### New `CMSEditLinkExtension` | ||
|
||
The silverstripe/admin module has a new [CMSEditLinkExtension](api:SilverStripe\Admin\CMSEditLinkExtension) which makes it trivial to generate an edit link for any `DataObject` even in nested `GridField` setups. This is useful, for example, when [making a previewable `DataObject`](/developer_guides/customising_the_admin_interface/preview/) or as links in reminder emails for stale content. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The silverstripe/admin module has a new [CMSEditLinkExtension](api:SilverStripe\Admin\CMSEditLinkExtension) which makes it trivial to generate an edit link for any `DataObject` even in nested `GridField` setups. This is useful, for example, when [making a previewable `DataObject`](/developer_guides/customising_the_admin_interface/preview/) or as links in reminder emails for stale content. | |
The `silverstripe/admin module` has a new [CMSEditLinkExtension](api:SilverStripe\Admin\CMSEditLinkExtension) which is used to generate CMS edit links for `DataObject`s, including those in nested `GridField` setups. | |
This allows you to share DataObject edit links directly with others. This extension is also used to facilitate CMS preview of DataObjects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
be6cd68
to
2c45760
Compare
Documents the new extension in silverstripe/silverstripe-admin#1361
Assumes silverstripe/silverstripe-cms#2778 is also merged.
Related Issue