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

Image gallery, display 4 images from album instead of cover image?


Go to End


6 Posts   1642 Views

Avatar
FireMe!

Community Member, 74 Posts

8 October 2010 at 12:24am

Hi guys,

I think the title explains what I need help with, On the image gallery module I want to display 4 images from the album instead of displaying the cover image? is this this a feature built in, If so how would I go about it?

thanks in advance,

Fire

Avatar
FireMe!

Community Member, 74 Posts

9 October 2010 at 2:13am

Please someone has to know a way? thanks

Avatar
UncleCheese

Forum Moderator, 4102 Posts

9 October 2010 at 10:05am

/your_theme/templates/Layout/ImageGalleryPage.ss

<% control Albums %>
<li>
<% control GalleryItems(4) %>
$Image.SetWidth(100)
<% end_control %>
</li>
<% end_control %>

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
FireMe!

Community Member, 74 Posts

9 October 2010 at 11:16pm

Hi UncleCheese,

I have gave it a try but it just seems to display all the images from each album, The 4 does not seem to limit it to 4.

Thanks in advance
FireMe!

Avatar
FireMe!

Community Member, 74 Posts

11 November 2010 at 1:32am

Please any idea why this is happening?

thanks,
FM

Avatar
FireMe!

Community Member, 74 Posts

13 November 2010 at 3:15am

Please help, I don't want all the images from each album displayed just 4?

Thanks in advance
FM