Hi,
I wonder if somebody could help me out. I have a new Page Type, SupporterPage. It's basically the same as a normal Page with the addition of a website URL field:
<?php
class SupporterPage extends Page {
static $db = array('SupporterWebsite' => 'Varchar(255)');
static $has_one = array();
static $icon = 'themes/VansBP/images/treeicons/supporter';
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField('SupporterWebsite'), 'Website');
return $fields;
}
}
class SupporterPage_Controller extends Page_Controller {
}
Problem is, the SupporterWebsite field does not appear on the CMS page. I have rebuilt the database (/dev/build/?flush=1) and the tables have been created, with the correct field added. It's just the CMS field that won't show.
If I change the tab to something like Root.Content.Website, then a new tab gets created, but the field still does not show.
Anyone have any ideas - have I made a newb error?! ;)