I apologise if this is really obvious and a stupid question but I'm a little stumped. I'm trying to add a field that is only visible on one page so I am using an if statement in the getCMSFields function of my page.
My question is is this even possible? Will it be called, etc? The reason I ask is that my if statement doesn't work unless I change getCMSFields to getCMSFields_forPopup which causes a whole new set of problems.
Thanks for your reply willr. I am using a Dataobject with a dataobjectmanager in movies. Can I still use this method? I'm relatively new to SilverStripe so my knowledge is limited but I can't see how it'll work that way.
I'm using 2.4.7, I just realised I never specified that earlier.
Ok that makes sense. Thank you. It's still not working exactly as I want it to but I have a better understanding of what is going on. I think my confusion lies with DataObjectManager though as it creates the popup for editing the data and is created within getCMSFields of Movies. If I understand correctly then I need to use getCMSFields_ForPopup in Movies instead?