Hello everyone,
I have a class like this:
class Imageattachment extends DataObject{
static $db = array(
'Title' => 'Varchar(100)'
);
static $has_one = array(
'Image' => 'Image',
'Whatever' => 'Class'
);
function getCMSFields_forPopup(){
$fields = new FieldSet();
$image = new ImageField('Image', 'Image you want to add');
$fields->push($image);
return $fields;
}
}
This works perfectly on any Page I build, except one thing. How do I setup backling tracking for Images?
I noticed that Backlinks only work, when an image is used directly inside a WYSIWYG but not on DataObjects or Pages. I've looked in the Docs and in the source of wysiwygsh classes, but didn't find anything. Any suggestions?