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.

General Questions /

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

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

Problems creating tab in cms


Reply


2 Posts   504 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, 5513 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.