Allow extending of blog holder fields

This commit is contained in:
Andrew O'Neil 2009-12-17 08:00:34 +00:00
parent 5dbbcaeaf1
commit e52171bf75

View File

@ -28,12 +28,16 @@ class BlogHolder extends BlogTree implements PermissionProvider {
);
function getCMSFields() {
SiteTree::disableCMSFieldsExtensions();
$fields = parent::getCMSFields();
SiteTree::enableCMSFieldsExtensions();
$fields->addFieldToTab('Root.Content.Main', new CheckboxField('TrackBacksEnabled', 'Enable TrackBacks'));
$fields->addFieldToTab('Root.Content.Main', new DropdownField('OwnerID', 'Blog owner', DataObject::get('Member')->toDropDownMap('ID', 'Name', 'None')));
$fields->addFieldToTab('Root.Content.Main', new CheckboxField('AllowCustomAuthors', 'Allow non-admins to have a custom author field'));
$this->extend('updateCMSFields', $fields);
return $fields;
}