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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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   483 Views


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?



Community Member, 151 Posts

23 November 2011 at 6:05am