I have created a VideoImage tab on my homepage.php like this
class HomePage extends Page {
static $db = array(
);
static $has_one = array(
'VideoImage' => 'Image',
'VideoTitle' => 'Text',
'VideoLink' => 'Text'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.VideoImage', new ImageField('VideoImage'), 'Content');
$fields->addFieldToTab('Root.Content.VideoImage', new TextField('VideoTitle'), 'Content');
$fields->addFieldToTab('Root.Content.VideoImage', new TextField('VideoLink'), 'Content');
return $fields;
}
so I have a video image tab with VideoImage, VideoTitle, VideoLink
I can't seem to access these now on my HomePage.ss. I thought it would just be $VideoImage.URLSegment, $VideoTitle, $VideoLink but this does not pull in values.
I have tried $Content.VideoTitle too and does not work. Can anyone point me in right direction. I know must be basic.