Hi
I have
class Foto extends DataObject
...
and in my FotoPage
$manager = new ImageDataObjectManager(
$this, // Controller
'Fotos', // Source name
'Foto', // Source class
'Attachment', // File name on DataObject
array(
'Name' => 'Name',
'Description' => 'Description'
//'Category' => 'Category'
), // Headings
'getCMSFields_forPopup' // Detail fields (function name or FieldSet object)
// Filter clause
// Sort clause
// Join clause
);
$f->addFieldToTab("Root.Content.Fotos",$manager);
in my _config.php
I set
SortableDataObject::add_sortable_classes(array('Foto'));
How to rearrange photos? Now when I add a Foto, it ceases at the end of the list. How to make it automatically becomes the first?
http://www.webspilka.com.ua/temp/foto_.png