I am using imagedataobject like this.
class Client extends DataObject
{
static $db = array (
'Name' => 'Text',
'Description' => 'Text',
'Category' => "Enum('Direct, Agency')"
);
static $has_one = array (
'Attachment' => 'Image',
'ClientHolder' => 'ClientHolder'
);
public function getCMSFields_forPopup()
{
return new FieldSet(
new TextField('Name'),
new TextareaField('Description'),
new DropdownField('Category','Category', singleton('Client')->dbObject('Category')->enumValues()),
new FileIFrameField('Attachment')
);
}
}
all i need to know is how do i produce to the page items that have been saved as 'category=Direct', or 'Category=Agency'
at the moment I am using
<div class="client_wrapper">
<% control Attachment %>
<div class="client_main">
$CroppedImage(167,113)
</div>
<% end_control %>
</div>
<% end_control %>
which produces all of them
thanks