bummzack

getCMSFields is what all DataObjects use. Within the base method of the DataObject, there's an "extension" call to updateCMSFields

Hels

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!

bummzack

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

bummzack

When you use the elemental module, it'll add a GridField to edit the elemental blocks to these fields.

Hels

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

bummzack

It's basically returning all form fields that are needed to edit the page in the CMS

bummzack

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?

Hels

thanks - all my successes are thanks to the kindness of people here!

Hels

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