I still can't get this to work, a little help would be appreciated. thank you.
I've added:
class SliderPage_Controller extends Page_Controller{
function MyRandomObject(){
return DataObject::get('Sliders',null,RAND()');
}
}
to my
SliderPage.php
It has no effect....
Should it read: return DataObject::get('Sliders','null','RAND()');
?
Although this changes nothing.
I've tried UncleCheeses advise for the Sort Clause
I can't find enough documentation to work this out properly but I asuming it goes here:
$manager = new DataObjectManager(
$this, // Controller
'Slideshows', // Source name
'Slideshow', // Source class
array('ShTitle' => 'Title', 'ShLink' => 'Image Link', 'ShLeftorRight' => 'Left or Right Slideshow', 'Thumbnail' => 'Image'), // Headings
'getCMSFields_forPopup' // Detail fields function or FieldSet
// Filter clause
// Sort clause
// Join clause
);
but how should it look / read?
like this...? but this does not have any effect.
$manager = new DataObjectManager(
$this, // Controller
'Sliders', // Source name
'Slider', // Source class
array('SliderTitle' => 'Title', 'SliderLink' => 'Image Link', 'Thumbnail' => 'Image'), // Headings
'getCMSFields_forPopup', // Detail fields function or FieldSet
'',// Filter clause
'(null, RAND());'// Sort clause
// Join clause
);