4572 Posts in 1316 Topics by 981 members
Customising the CMS
SilverStripe Forums » Customising the CMS » custom tabs wroking but not well =(
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 1158 Views |
-
custom tabs wroking but not well =(

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'));
-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...
-
Re: custom tabs wroking but not well =(

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.
| 1158 Views | ||
|
Page:
1
|
Go to Top |

