Just installed Image Gallery (r271) today and trying to get example for latest images on front page to work.
I've put this in the Page_Controller section of my top-level Page.php:
public function LatestImages()
{
return DataObject::get("ImageGalleryItem", null, "Created DESC", null, 8);
}
and this at the top of my local copy of ImageGalleryPage.ss, as I want latest 8 images from all galleries to appear on top-level gallery page:
<ul id="gallery-list" class="gallery-layout loaded">
<% control LatestImages %>
<li style="height:{$Top.ThumbnailSize}px;width:{$Top.ThumbnailSize}px;">
<a id="ViewLink-$ID" rel="$RelAttr" class="$ClassAttr" title="$Caption" href="$ViewLink"><img src="$ThumbnailURL" alt="$Title"/></a>
</li>
<% end_control %>
</ul>
now I'm getting 8 placeholders return it seems, but each html list item appears as:
<a id="ViewLink-10" class="" rel="" title="" href=""><img src="" alt="#10"/></a></li>
the fact I'm getting an id value back seems to tell me I'm getting close, but why no other attributes populated?