Jump to:

23007 Posts in 11866 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Problems creating tab in cms

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

Page: 1
Go to End
Author Topic: 413 Views
  • jolly
    Avatar
    Community Member
    1 Post

    Problems creating tab in cms Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: Problems creating tab in cms Link to this post

    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.

    413 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.