I am building up a site, and following the tutorials, but have hit a problem while trying to add a tab to the admin to manage the sidebar content.
The following code works, showing the Tab, but won't let me save a page instead showing 'Error showing content'. Is there anything very obviously I am doing wrong?
class Page extends SiteTree {
static $db = array(
'Sidebarcontent' => 'Content'
);
static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Sidebar', new TextareaField('Sidebarcontent'), 'Content');
return $fields;
}
}