Hi, all.
I'm new to SilverStripe (v3.4.1) and I'm struggling to add a new HTML field to the database and the CMS. I've watched a number of UncleCheese lessons, followed a couple of tutorials and read a number of posts. I thought I had it figured out but it's simply not working for me. I'm trying to add another HTML text field to the content tab of the page editor. It's to allow me to separate out banner content, so I'd ideally like it to appear immediately above the 'Content' window (although I haven't got as far as working out the display order!).
After I add the relevant code to Page.php and flush by appending /db/build?flush=1 to my URL, the page edit area in the CMS is completely blank. Just the CMS menu on the left and nothing else. This is the top of my Page.php file...
<?php
class Page extends SiteTree {
private static $db = array(
'Banner' => 'HTMLText'
);
private static $has_one = array(
);
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content", new HTMLEditorField('Banner','Banner'));
return $fields;
}
}
I've also tried "Root.Main" and "Root.Content.Main" to no avail. What am I missing? Please help!
Adam