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.

Customising the CMS

Adding a new tab to Content


3 Posts   2214 Views


12 June 2009 at 5:44am Community Member, 3 Posts

Hi guys,

I want a new tab in the Content tab right next to the metadata tab...
for example Main ||Metadata || Job Listing

I'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 ?


13 June 2009 at 1:27am Community Member, 6 Posts

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.


17 June 2009 at 8:59am Community Member, 3 Posts

That works . Thanks a lot :)