21489 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 174 Views |
-
Custom DataObject CMS editor interface

20 February 2013 at 4:25am
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 -
Re: Custom DataObject CMS editor interface

24 February 2013 at 4:43am
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
| 174 Views | ||
|
Page:
1
|
Go to Top |

