Hi all,
I've attempted to create a new page type in SilverStripe version 2.3.0 rc2/rc3 but am not having much luck getting it to display in the front end. I think the same code was working in v2.2.3 but I retyped it by hand. Could anyone look at what I did and let me know if I missed anything.
The following is the code that I created in mysite/code/TwoColumnPage.php:
<?php
class TwoColumnPage extends Page {
public static $db = array(
'SidebarContent' => 'HtmlText'
);
public static $has_one = array();
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new HtmlEditorField('SidebarContent', 'Sidebar Content'));
return $fields;
}
}
class TwoCoumnPage_Controller extends Page_Controller {
}
?>
Following this I did the usual DB build and my pages appear in the admin section. So I've tried to create a page but when I try and view this website in the webpage, all I get is a HTML page saying "TwoColumnPage". In RC2 this appeared to be a HTML page (there were html, head & body tags in the source) but in RC3 it's just the text "TwoColumnPage".
I've also tried creating themes\mytheme\templates\Layout\TwoColumnPage.ss but that's not helping at all.
Has anyone else had this problem? Could it be a bug in the new release candidates (can't see anything in the bug tracker)? Or am I missing something simple?