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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

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


Go to End


1296 Views

Avatar
Neelam

Community Member, 15 Posts

15 September 2012 at 12:20am

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