Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Add Sub-tabs under settings->main tab keeping the default fields in a separate tab

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

Page: 1
Go to End
Author Topic: 495 Views
  • Neelam
    Avatar
    Community Member
    15 Posts

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

    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",
           array(
             
                '-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...

    495 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.