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.

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


Go to End


11 Posts   2487 Views

Avatar
UncleCheese

Forum Moderator, 4102 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