I have everything in here working except displaying the contents of the sidebar itself, i think i am missing some basic functionality of how the variables are passed.
My Page:
<?php
class PageWSidebar extends SiteTree {
public static $db = array("SideBar" => "HTMLText"
);
public static $has_one = array("SideBar" => "HTMLText"
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField ('SideBar', 'SideBar Content'));
return $fields;
}
}
class PageWSidebar_Controller extends ContentController {
public function init() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
}
}
?>
and in my Theme I just have
<div class="foo"> $SideBar </div>
there's no errors, it just doesn't show anything that i type into the field in the cms