Hi
What I am after doing is have a different header image for each page so i noticed this topic http://www.silverstripe.org/template-questions/show/254016#post254016 and Aram has put a post of a good way to do it but i can not seem to get it to work, Aram can you help me :-)
Here is the code
Page.php
class Page extends SiteTree {
public static $db = array(
);
public static $has_one = array(
);
static $has_one = array (
'HeaderImage' => 'Image'
);
function getCMSFields() {
$fields = parent::getCMSFields();
if(!$this->Parent){
$fields->addFieldToTab("Root.Content.Main", new ImageField('HeaderImage'));
}
return $fields;
}
}
page.ss
<% control Level(1) %>
$HeaderImage
<% end_control %>
I seem just to get a blank white screen, I bet is something simple.
Thanks in advance
FireMe