Please help,
Installed SS 3.0.3, using WAMP 2.1
Following tutorial 2, added a date field to the ArticlePage, trying to create a page of type ArticlePage, getting this error:
Fatal error: Call to undefined function setConfig() in C:\wamp\www\clunysilver\mysite\code\ArticlePage.php on line 14
My code:
class ArticlePage extends Page
{
static $db = array(
'Date'=>'Date',
'Author'=>'Text'
);
public function getCMSFields()
{
$fields = parent::getCMSFields();
$dateField = new DateField('Date', 'Article Date');
$dateField = setConfig('showcalendar', true);
$fields->addFieldToTab('Root.Main', $dateField);
$fields->addFieldToTab('Root.Main', new TextField('Author'));
return $fields;
}
}