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


Go to End
Reply


11 Posts   1551 Views

Avatar
UncleCheese

Forum Moderator, 4094 Posts

10 August 2010 at 8:09am

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

Avatar
sajok

Community Member, 82 Posts

10 August 2010 at 8:37am

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

Community Member, 82 Posts

10 August 2010 at 8:45am

Edited: 10/08/2010 8:46am

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);
}

:)

Go to Top