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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

custom tabs wroking but not well =(

Go to End

3 Posts   2119 Views


Community Member, 32 Posts

17 January 2009 at 10:34am

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'));
$fields->addFieldToTab('Root.Content.Test.Subject3', new TextField('x'));
$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...


Community Member, 32 Posts

27 January 2009 at 12:48pm



Forum Moderator, 4102 Posts

27 January 2009 at 1:59pm

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.