Here's the code I've put into the /var/www/sstripe/tutorial/code/ArticlePage.php file:
<?php
/**
* Defines the ArticlePage page type
*/
class ArticlePage extends Page {
static $db = array(
'Date' => 'Date',
'Author' => 'Text'
);
static $has_one = array(
);
static $icon = "tutorial/images/treeicons/news";
static $defaults = array(
'ProvideComments' => true
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
return $fields;
}
}
class ArticlePage_Controller extends Page_Controller {
}
?>
I'd appreciate a pointer as to where I've gone wrong. Using version 2.2.2 in a Debian 4 environment.
Thanks!
Yardiff