Jump to:

5451 Posts in 1673 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » custom tabs wroking but not well =(

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

Page: 1
Go to End
Author Topic: 1400 Views
  • mccarville
    Avatar
    Community Member
    32 Posts

    custom tabs wroking but not well =( Link to this post

    So I was able to add custom tabs to the cms:

    $fields->addFieldToTab('Root.Content.Test', new TextField('x'));
    $fields->addFieldToTab('Root.Test', new TextField('x'));

    both of these produced the desired results.

    When I tried to add

    $fields->addFieldToTab('Root.Test.Subject3', new TextField('x'));
    -or-
    $fields->addFieldToTab('Root.Content.Test.Subject3', new TextField('x'));
    -or-
    $fields->addFieldToTab('Root.Access.Test', new TextField('4'));

    It would crash the CMS... is there a way to get around this... I am really looking to creat Root.custom.custom if possible.

    Is there a file some where that defines the Content tab that could be copied and renamed to create addtional tab that had the easy ability to create child tabs?

    Thanks in davnce for the help... the forum has been a Tremendous resource so far...

  • mccarville
    Avatar
    Community Member
    32 Posts

    Re: custom tabs wroking but not well =( Link to this post

    anyone?

  • UncleCheese
    Avatar
    4085 Posts

    Re: custom tabs wroking but not well =( Link to this post

    My guess is that you can't do two customs at once because the FieldSet object runs a FindOrMake() function for the tab you specify. I think the only way to do it is to first add a field to Root.Custom, then add a field to Root.Custom.Custom. But if both customs haven't been created yet, i dont' think you can get both at once. Just a hunch.

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