OK, well this is part two ... The pics are rotating and using the DOM people can log in and add their banners. I have added another field to the DOM that allows people to add an URL
-------------------
<?php
class Banner extends DataObject
{
static $db = array (
'Name' => 'Text',
'Description' => 'Text',
'URL' => 'Text'
);
static $has_one = array (
'Attachment' => 'Image',
'BannerPage' => 'BannerPage'
);
public function getCMSFields_forPopup()
{
return new FieldSet(
new TextField('Name'),
new TextField('URL'),
new TextareaField('Description'),
new FileIFrameField('Attachment')
);
}
}
?>
I am using this function to call the pics
public function Banners() {
$folder = Folder::findOrMake("Uploads");
return DataObject::get("Image", "ParentID = $folder->ID");
}
Thank you Uncle
What is the best way to attribute the URL value to the image?
Thank you for your help!