Hi,
Im pretty new to SilverStripe, so excuse my ignorance but I cant figure out how to access an image ive uploaded via a custom module ive built.
Ive created the custom module and added to it an extra field in the CMS:
$fields->addFieldToTab('Root.Content.Main', new ImageField('Image','Upload Image'), 'Content');
ive also added the Image field to the has_one array:
static $has_one = array('Image' => 'File');
Now how do i call that in the .ss file? Is there a pre built function for loading in an associated image similar to $Content
or do i have to call a custom function that i build in the Controller of my module and return the image through it?
if i have to build it custom, what do i need to write in there? i dont have much of an idea..
Some help would be great.
Cheers!
Craig.