I am new to SilverStripe so I know this is probably my lack of knowledge but in following Step II I keep getting a blank page after flushing
ArticlePage.php
<?php
/**
* Defines the ArticlePage page type
*/
class ArticlePage extends Page {
static $db = array(
'Date' => 'Date',
'Author' => 'Text'
);
static $has_one = array(
);
}
class ArticlePage_Controller extends Page_Controller {
}
?>
I am supposed to add this -
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new DateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
return $fields;
}
}
so now the file looks like this-
<?php
/**
* Defines the ArticlePage page type
*/
class ArticlePage extends Page {
static $db = array(
'Date' => 'Date',
'Author' => 'Text'
);
static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new DateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
return $fields;
}
}
}
class ArticlePage_Controller extends Page_Controller {
}
?>
When I flush the CMS I get a blank page.
Thank you in advance for any help.
Tony