return DataObject::get("ImageGalleryAlbum", "ImageGalleryPageID > 0", "Created DESC", $num);
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
DataObjectManager Module /
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba
Latest albums on frontpage
- Previous 10 entries
- 1
- Page 22(current)
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..
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);
}
:)
- Previous 10 entries
- 1
- Page 22(current)