Message of the day:
Design: https://projects.invisionapp.com/dsm/silver-stripe/silver-stripe/folder/components/5b42ca0dc1ba8c001a91b69b Background: https://docs.google.com/document/d/1hffZFknysYi6tp55eOk4DzON4pjoEt7Xq4GGD-ZGah0/edit
Discuss the future of content editing in SilverStripe via content blocks
getCMSFields is what all DataObjects use. Within the base method of the
DataObject, there's an "extension" call to
yeah, I have used it. but have used create as well as parent::getcmsfields and updatecmsfields and to be honest I dont really know why I used different ones in different places - just that it makes it work!
So you can use that to your advantage, by getting a hold of that
GridField in your
getCMSFields method and change the behavior/components of the gridfield
When you use the elemental module, it'll add a GridField to edit the elemental blocks to these fields.
if someone was able to produce a list of the ways to adapt things that would be awesome - eg there is getcmsfields vs updatecmsfields & onbeforewrite vs onafterwrite. explanations of things like that would really help
It's basically returning all form fields that are needed to edit the page in the CMS
Or you should know it from the lessons
Maybe I should give some more context to the snippet I posted here… I guess you have used the
getCMSFields method before in your Page classes, right?
thanks - all my successes are thanks to the kindness of people here!
I have done most of the lessons and they helped enormously. I can see that they would be excellent for someone with prior experience. It was just lacking an overview to allow adapting the content to extra things