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.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Gallery feed onto homepage


Go to End


2 Posts   580 Views

Avatar
lozhowlett

Community Member, 151 Posts

22 November 2011 at 5:56am

Edited: 22/11/2011 6:30am

Hi Everyone

I want to grab the latest uploaded images from by "image gallery" module...

function GalleryLatest($num=10){
        $gallery = DataObject::get_one("ImageGalleryItem"); 
        return ($gallery) ? DataObject::get("ImageGalleryItem", "", "Created DESC", "", $num) : false; 
    }

which works in terms of getting the database rows, however how to I load the "ImageID" into an actual image, i.e. I cant find the table that lists all the image IDs and their paths?

Thanks

Avatar
lozhowlett

Community Member, 151 Posts

23 November 2011 at 6:05am

Bump