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.

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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Problems creating tab in cms


Go to End


2 Posts   778 Views

Avatar
jolly

Community Member, 1 Post

8 July 2011 at 7:59am

Edited: 08/07/2011 7:08pm

Hello, I bought the book to learn the SilverStripe works a bit like this platform. I'm new in this world of programming. My question is here, I created this code through the book and the tab does not appear Jobs

function getCMSFields() {
$fields = parent::getCMSFields();
$jobsTable = new ComplexTableField($this, 'Jobs', 'Job');
$fields->addFieldToTab("Root.Content.Jobs" , $jobsTable");
return $fields;

}

mysite/code/JobCategory.php

someone help me?

Avatar
Willr

Forum Moderator, 5523 Posts

10 July 2011 at 4:41pm

Is that code called at all? If you put a 'die()' in there does it break and kill everything? If it doesn't then that function isn't even being called. Check the type of the page in the CMS, also make sure that function is in the JobCategory class.