Hi All.
I'm having a problem with my images, hopefully someone can help.
I added the following in my page.php file under the "class Page extends SiteTree":
public static $has_one = array( 'Banner' => 'Image' );
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Banner", new ImageField('Banner'));
return $fields;
}
The banner image uploads, but no picture. When I look at the source html it shows: <img src="/assets/" alt="assets/" />
What am I doing wrong?