Hi,
I've gone through the tutorials on setting up and extending a site with SilverStripe. I added the news section like the tutorial said, however when I go back to perform the same basic action of adding a new field to the "Page" page, upon saving or publishing the ajax loading graphic just spins like it can't save. I added a masthead image field and below is my code, if anyone can help me I'd appreciate it. This is the last thing on my to-do list for this site and I was hoping it would be easy. Thanks.
(Note: the calltoaction function works perfectly).
<?php
class Page extends SiteTree {
static $db = array('Masthead'=>'text');
static $has_one = array();
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField('Masthead', 'Masthead Image'), 'Content');
return $fields;
}
}
class Page_Controller extends ContentController {
function CallToAction(){
$cat = DataObject::get_by_id('Page', 15);
return $cat;
}
}
?>