Hi all,
I need to get the images that are displayed in the gallery to appear in the the normal templated page when a thumbnail is clicked. I have set the pop up to 'none' but that just displays the image and nothing else.
Any ideas?
Cheers
:D
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba
Hi all,
I need to get the images that are displayed in the gallery to appear in the the normal templated page when a thumbnail is clicked. I have set the pop up to 'none' but that just displays the image and nothing else.
Any ideas?
Cheers
:D
It's not really set up to do that, but you could do it pretty easily by subclassing it out. Some pseudo-code:
class MyImageGalleryPage_Controller extends ImageGalleryPage_Controller
{
function image()
{
return $this->customise(array('Item' => DataObject::get_by_id("ImageGalleryItem",$this->urlParams['ID'])))->renderWith(array('MyImageGalleryPage_image','Page');
}
}
MyImageGalleryPage_album.ss:
<% control GalleryItems %>
<li style="height:{$Top.ThumbnailSize}px;width:{$Top.ThumbnailSize}px;">
<a href="<% control Top %>$Link(image)<% end_control %>$ID"><img src="$ThumbnailURL" alt="$Title"/></a>
</li>
<% end_control %>
MyImageGalleryPage_image.ss
<% control Item %>
$Image.SetWidth(500)
$Caption
<% end_control %>
Something like that oughta work.
Thanks. Will have try with that.
:)