Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS

Add Sub-tabs under settings->main tab keeping the default fields in a separate tab




15 September 2012 at 12:20am Community Member, 15 Posts

I have added new Sub Tabs Under The Settings->Main Tab in The Silverstripe 3.0 Back-End using the following code:

public function updateCMSFields(FieldList $fields) {
       $fields->addFieldToTab('Root.Main', new TabSet('Tab1'),'Theme');
       $fields->addFieldToTab('Root.Main.Tab1', new Tab('SubTab1',new HTMLEditorField("Text", "Text")));
       $fields->addFieldToTab('Root.Main.Tab1', new Tab('SubTab2', new DropdownField("DropDown1","DropDown",
            '-1' => 'Option1',
            '1' => 'Option2',

But The Main Tab already has a field named theme under it which is generated by default. I need to keep this field separated from the tabs which I have added...maybe creating a new sub-tab for it...Please tell me how I can achieve this...Currently it appears under every tab...