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

Display Recent Images on Homepage


Go to End


3 Posts   1952 Views

Avatar
OutrunTheWolf

Community Member, 34 Posts

1 June 2009 at 12:57pm

Hello,

I would like to display a list of 5 recent images from my image gallery module on my Homepage. I'm not too sure how to go about it could anyone shed any light on the subject please?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

1 June 2009 at 1:31pm

function RecentImages()
{
return DataObject::get("ImageGalleryImage", null, "Created DESC", null, 5);
}

Avatar
OutrunTheWolf

Community Member, 34 Posts

2 June 2009 at 7:15am

Thanks Cheese, your my favourite Uncle