Hi
I have an image that is used on the homepage (HomePage.php) as per the following code:
public static $has_one = array(
'Image1' => 'Image'
);
I then wish to use the same image throughout the site (Page.php)
I have tried using;
public function Image1(){
$obj = SiteTree::get_one('HomePage');
return $obj->Image1;
}
But it just gives me an error. I am also trying to do the same with Content1 which is an HTMLText field, but that throws the same error
Any ideas??