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 /

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

[SOLVED]Tutorial problem - News fields don't display

Go to End

3 Posts   506 Views


Community Member, 23 Posts

12 January 2013 at 6:02am


I started learning ss today and I am following the tutorials.

I am at tutorial number 2: Extending a basic site

I have created the ArticlePage and ArticleHolderPage but when I go and create a page of type ArticleHolder there are no date and author fields in the content tab.

My code for the ArticlPage:

class ArticlePage extends Page
	static $db = array(

class ArticlePage_Controller extends Page_Controller
	public function getCMSFields()
		$fields = parent::getCMSFields();
		$dateField = new DateField('Date');
		$dateField = setConfig('showcalendar', true);
		$fields->addFieldToTab('Root.Main', $dateField, 'Content');
		$fields->addFieldToTab('Root.Main', new TextField('Author'), 'Content');
		return $fields;

Am I doing something wrong?

Thank you


Community Member, 23 Posts

12 January 2013 at 7:24pm

Ok, I found one mistake I've made which is putting the getCMSFields function in the wrong class.

Moved it from the ArticlePage_Controller class to ArticlePage class.

Flushed the site, always do, still nothing.

Please, can someone help?


Community Member, 23 Posts

13 January 2013 at 12:55am

Ok, refreshed again, now I see the fields under the content field.

In the tutorial they are above the content field, maybe that's why I didn't see them on my site. Not sure.