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!!!
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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;
}
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
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.
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