Hi All,
I have a gallery which I am using DataObject Manager to add multiple images and it all works fine.
However I want to display the first 3 images of the gallery on another page.
I've searched for a solution and tried figuring it out myself but have had no success.
I can get the images to appear on the other page but it shows all of them instead of just 3.
This is my code that I have tried
<% if GalleryImages %>
<% control GalleryImages(3) %>
<div class="listing_pic">
<a href="$Link"><img src="$MyGalleryImage.GroupThumb.URL" alt="<% sprintf(_t("IMAGE","%s image"),$Title) %>" /></a>
</div>
<% end_control %>
<% end_if %>
I also have tried
public function GalleryImages($Limit = 3){
return DataObject::get("GalleryImage", "ParentID = $this->ID", Null, Null, $Limit);
}
Any help would be appreciated, Thanks
** EDIT - I am using ss 2.4