I'd like to setup an image field for my users in a custom built page... Code pasted below after post...
When i rebuild and then launch the CMS anew and go to the page. I see all 3 new fields, placed correclty but both imagefields just stay gray! Am i missing something?
----------------------------------------------------------
class GeneralItem extends Page {
static $db = array(
"HomeLogo" => "varchar",
"MainLogo" => "varchar",
"Abstract" => "Text",
);
static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new ImageField('HomeLogo', null, null, null, null, "assets/Uploads/"), 'Content');
$fields->addFieldToTab('Root.Content.Main', new ImageField('MainLogo', null, null, null, null, "assets/Uploads/"), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Abstract'), 'Content');
return $fields;
}
}