Jump to:

5554 Posts in 1742 Topics by 1227 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Add Third Level Tabs

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

Page: 1
Go to End
Author Topic: 2273 Views
  • DeklinKelly
    Community Member
    197 Posts

    Add Third Level Tabs Link to this post

    How can I create a third level of tabs in the administrative area of the CMS?

    I can create a new tab named "Zooph" like this:

    $fields->addFieldToTab("Root.Content.Zooph", new LiteralField('CustomCode1','Hello World'));

    But how can I create a deeper level of tabs under "Zooph"?

  • Willr
    Forum Moderator
    5511 Posts

    Re: Add Third Level Tabs Link to this post

    AFAIK you can only create 2 levels. If Root.Content.Zooph.Test doesn't work then I would assume it doesn't work.

  • Martijn
    Community Member
    271 Posts

    Re: Add Third Level Tabs Link to this post

    You can add new TabSets easily:

    function getCMSFields() {
          $fields = parent::getCMSFields();
          $fields->addFieldToTab("Root.Content.ContentBlocks",new TabSet('ContentBlockSet',
             new Tab('HeaderContent', new HTMLEditorField("HeaderContent")),
             new Tab('LeftContent', new HTMLEditorField("LeftContent")),
             new Tab('RightContent', new HTMLEditorField("RightContent"))
          $fields->addFieldToTab("Root.Content.Widgets",new TabSet('WidgetsSet',
             new Tab('WidgetsLeftTop', new WidgetAreaEditor("WidgetsLeftTopArea")),
             new Tab('WidgetsLeftBottom', new WidgetAreaEditor("WidgetsLeftBottomArea")),
             new Tab('WidgetsRightTop', new WidgetAreaEditor("WidgetsRightTopArea")),
             new Tab('WidgetsRightBottom', new WidgetAreaEditor("WidgetsRightBottomArea"))

          return $fields;


  • Graphicator
    Community Member
    62 Posts

    Re: Add Third Level Tabs Link to this post

    Thank you for this fresh information.

    I ran into a website error whenever I added more than four 2nd-level tabs in the CMS. This solution was a breeze.

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