Hi fhuery
Might be easier to use this:
http://lokeshdhakar.com/projects/lightbox2/because calling / using the lightbox effect does'nt require that javascript you have in the footer, instead it looks for "rel="lightbox[roadtrip]" where lightbox does the pretty zstuff and [roadtrip] is the gallery name, so you could do something like this for a
repeatable gallery on a page:
Editable region:
- Code: Select all
<cms:repeatable name='product_gallery' label='Product Gallery'>
<cms:editable type='image' name='product_image' label='Image File' show_preview='1' preview_width='150' input_width='200' col_width='200' />
<cms:editable type='text' name='image_caption' label='Image Caption' />
</cms:repeatable>
then do handle the "front end gallery"
- Code: Select all
<cms:show_repeatable 'product_gallery'>
<a href="<img src="<cms:show product_image />" rel="lightbox[gallery]" title="<cms:show image_caption"><img src="<cms:thumbnail product_image width='100' height='100' />" /></a>
</cms:show_repeatable>
Note that the image uses "cms:show" to get the full scale image as uploaded, and the thumbnail inside the link is using cms:thumbnail to set the width and height. I've just coded in [gallery] but if you had multiple repeatable galleries on a page then you might want to use the repeatable region name in there so they are unique for each gallery.