Hello,
I started learning ss today and I am following the tutorials.
I am at tutorial number 2: Extending a basic site http://doc.silverstripe.org/framework/en/tutorials/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(
'Date'=>'Date',
'Author'=>'Text'
);
}
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