5095 Posts in 1518 Topics by 1114 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1467 Views |
-
Adding a new tab to Content

12 June 2009 at 5:44am
Hi guys,
I want a new tab in the Content tab right next to the metadata tab...
for example Main ||Metadata || Job ListingI'm new to silverstripe and i tried the following code from the tutorial...but its not working
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new Tab('JobListings'), 'Content');
return $fields;
}Can anybody help me around ?
-
Re: Adding a new tab to Content

13 June 2009 at 1:27am
This should do the trick.
$fields->addFieldToTab('Root.Content.JobListings', new TextField('Foo'));
You might also have a look at the API Docs to see what the parameters do here.
http://api.silverstripe.com/forms/fields-structural/FieldSet.html#addFieldToTab
| 1467 Views | ||
|
Page:
1
|
Go to Top |

