17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1926 Views |
-
how I can creat a new Tab?

27 March 2008 at 5:39am
hello frd, I'm trying to create a new Tab in Product but I don't find the wat, could u show me how I can do it? thank u!!!
-
Re: how I can creat a new Tab?

27 March 2008 at 5:49am
Read the tutorials for extending a basic site
http://doc.silverstripe.com/doku.php?id=tutorial:2-extending-a-basic-site
You add something like this to your class, directly taken from the tutorial:
function getCMSFields() {
$fields = parent::getCMSFields();$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
return $fields;
} -
Re: how I can creat a new Tab?

27 March 2008 at 8:05am
hello Lee for u quick answer but it is ok when I want to add field to a tab already existent, but I want to create new tab!!! if u know how I can do it I will be grateful thank u
-
Re: how I can creat a new Tab?

27 March 2008 at 8:30am
The line in the above code Root.Content.Main refers to your site structure.
Root is the start/top level, Content refers to the content tab, and main is the main tab. Just change the name to a new tab and it will make it for you.
-
Re: how I can creat a new Tab?

28 March 2008 at 10:29pm
hello Lee, thank u!!!! it works!!!! now I have another task and I don't know how to start:
I'm using SilverStrip CMS and I want to move the ecommerce module in the top menu and to remove it of site content (the products)!!!! I'm newbie and need a guide how to do it, thank for ur help
| 1926 Views | ||
|
Page:
1
|
Go to Top |


