Jump to:

23360 Posts in 18097 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Custom DataObject CMS editor interface

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 369 Views
  • esakrielaart
    Avatar
    Community Member
    54 Posts

    Custom DataObject CMS editor interface Link to this post

    Hi all,

    This is an issue I'm dealing with for a while. In a nutshell, I wish to completely change the way the Fields of a DataObject in the CMS (backend) are displayed, for one specific DataObject (which may be controlled by using a ModelAdmin subclass or via a subclass of LeftAndMain). I think I tried all possible ways of overloading templates etc. without that much of success. So, am I missing the obvious? Your help will be highly appreciated.

    Kinds regards,
    Maurice Krielaart

  • esakrielaart
    Avatar
    Community Member
    54 Posts

    Re: Custom DataObject CMS editor interface Link to this post

    Solved, but in a rather non proper way.

    Explanation: the framework currently is not flexiable enough to understand $this->getTemplatesWithSuffix('_EditForm') for GridFields. That is, as a consequence of the GridFieldDetailForm class, around line 327 where

    $form->setTemplate('LeftAndMain_EditForm');

    This means that only overloading LeftAndMain_EditForm.ss (as described in http://doc.silverstripe.org/framework/en/howto/extend-cms-interface) will do the job, but that is not a solution in my case.

    Hence, you might create a CustomGridFieldDetailForm class which extends the GridFieldDetailForm, with onliest change being the line mentioned above.

    I hope this helps others who also struggle with this issue.

    Kinds regards,
    Maurice Krielaart

    369 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.