Hi
I have a SS site with two sidebars. The sidebars are commen for all the sites pages. Some of the content blocks in both sidebars should be editable via the cms.
What is the way to do this?
I think I have to make a ContentBlockPage with:
Class ContentBlocksPage extends Page{
private static $db = array(
'Content1' => 'HTMLText',
'Content2' => 'HTMLText'
);
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Main', new HTMLEditorField(' Content1',), 'Content');
$fields->addFieldToTab('Root.Main', new HTMLEditorField(' Content2',), 'Content');
return $fields;
}
}
Class ContentBlocks_Controller extends Page_Controller{
}
If I do this I still have the ordinary content field in the sitetree in db.
And how do I get the db-data into my sidebars, which now is static include-files. I can use $Content1 in the ss-files. But where is the connection to the db?
Maybe this not the right approch at all, this must be a common problem. I have tried to search for a solution, but I couldn't find one.
Any suggestions?