Here is my setup/dilemma
ImageGalleryHolder
ImageGalleryPage
ImageGalleryPageImage [a dataobject - a has many relationship of ImageGalleryPage]
Here is the current state [in development]http://crankygranny.com/flpr/about-the-river/photos/
On the the Image Gallery Holder Page I want to display all of the ImageGalleryPages, *but* in that display only show say 3 images from that ImageGalleryPage. Right now in the holder page i just do <% control Children %> and it iterates and shows thumbs for *all* of Images belonging to a ImageGalleryPage. I would just like call a method that returns only 3 of this Images, or in the template just limit the iteration in the Child to 3.
I have tried multiple ways to create my own method in ImageGalleryHolder which is called once I start iterating, but I think I run into the scope issue of $Top and $Children. Once I get down into control ImageGalleryPageImages I cannot seem to get that Page's ID in a method to then get those files.
Here is the code I have in my Holder.ss
<% if Children %>
<ul class="imageGalleries">
<% control Children %>
<li>
<h3><a href="$Link" title="$GalleryTitle">$GalleryTitle</a></h3>
<p>{$GalleryExcerpt} <a href="$Link" title="$GalleryTitle">View the complete gallery »</a></p>
<ul>
<% control ImageGalleryPageImages %>
<li class="imageGalleryItem">
<a rel="imageGallery" title="$Caption" href="$Attachment.Filename">
<% control Attachment %>
<img src="$CroppedImage(160,160).URL" alt="$Title" />
<% end_control %></a>
<span class="caption">$Description</span>
</li>
<% end_control %>
</ul>
</li>
<% end_control %>
</ul>
<% end_if %>
** I know there is the Image_Gallery Module from Uncle Cheese, but this requirement is a bit of an edge case. So it not a solutin to just use that module.
Thanks in advance for any help.
Ed