Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Latest albums on frontpage


Reply

11 Posts   1498 Views

Avatar
UncleCheese

10 August 2010 at 8:09am 4085 Posts

return DataObject::get("ImageGalleryAlbum", "ImageGalleryPageID > 0", "Created DESC", $num);

Avatar
sajok

10 August 2010 at 8:37am Community Member, 82 Posts

if I understood you correctly, this is what my function now looks like:

function LatestAlbums($num=4) {
return DataObject::get("ImageGalleryAlbum", "ImageGalleryPageID > 0", "Created DESC", $num);
}

this still returns an error..

Avatar
sajok

10 August 2010 at 8:45am (Last edited: 10 August 2010 8:46am), Community Member, 82 Posts

Thank you so much UncleCheese, this works now after adding an empty parameter before $num.

function LatestAlbums($num=4) {
return DataObject::get("ImageGalleryAlbum", "ImageGalleryPageID > 0", "Created DESC", "", $num);
}

:)