2863 Posts in 731 Topics by 699 members
Template Questions
SilverStripe Forums » Template Questions » How do you display Thumbnails in GalleryHolder?
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 991 Views |
-
How do you display Thumbnails in GalleryHolder?

17 June 2009 at 9:06am Last edited: 17 June 2009 9:37am
Hey all,
I found a thread ( http://www.silverstripe.org/archive/show/126874#post126874 ) which talks about displaying thumbnails in GalleryHolder.php(displaying thumbs is easy in GalleryPage, however the issue is I cannot find the gallery items within the children control of the GalleryHolder.php).
Here is the example that is demonstrated in the other thread:
<% control children %>
<a href="$Link">$Title</a>
<% control CurrentGalleryItems %><!-- Template stuff, copied from GalleryPageContent.ss to display the images -->
<% end_control %>
<a href="$Link">go to gallery >></a>
<% end_control %>When i do this i'm not getting any data passed to my <% control CurrentGalleryItems %>. I did an <% if CurrentGalleryItems %> and it never returns true..am I missing something to send current gallery items?
Here is my current GalleryHolder.ss file
<% control Children %>
<% control CurrentGalleryItems %>
<img src="$ThumbnailURL" alt="$Title"/>
<% end_control %><div id="$URLSegment" class="articleHolder" style="">
<div><a href="$URLSegment">$Title</a></div>
<p class="articleCopy">$Content</p><% include GalleryPageContent %>
</div>
<% end_control %>However, CurrentGalleryItems is not returning any data even though if they gallery is working..am I missing something? Thanks!
-
Re: How do you display Thumbnails in GalleryHolder?

17 June 2009 at 9:49am
Well I found a way to get it working setting a limit
<% control GalleryItems(10) %>
instead of <% control CurrentGalleryItems %> and it works now! I'm not sure if this is the best way to list items from the gallery but it works!
| 991 Views | ||
|
Page:
1
|
Go to Top |

