Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hello!
I want to create a simple (bootstrap) image lightbox galery but for some reason it doesn't work out the way I want.

It should be hooked upon some simple HTML code that includes an image tag as thumbnail + a link to the main image which opens as lightbox (doesn't need any cropping at all, Lightbox plugin takes care). This HTML part should simply be repeated:
Code: Select all
<cms:show_repeatable 'galery'>
   <a href="<cms:show gg_image />" data-toggle="lightbox" data-gallery="gallery" class="col-md-3"> <img src="<cms:show gg_thumb />"  class="img-fluid rounded" /> </a>
</cms:show_repeatable>


This is my couch code:

Code: Select all
<cms:repeatable 'galery'>
   
   <cms:editable
      name="gg_image"
      label="Image"
      desc="Upload your main image here"
      show_preview='1'
      type="image"
   />
   
   <cms:editable
      name="gg_thumb"
      assoc_field="gg_image"
      label="Image Thumbnail"
      desc="Thumbnail of image above"
      width='500'
      height='500'
      enforce_max='1'
      type="thumbnail"
     crop="1"
   />

</cms:repeatable>


For some reason the a-tag links to gg_thumb (thumbnail) but should link to gg_image (full image without cropping). However img tag remains completey empty. No src="" is added (checked with browser inspector) Besided that, I would like to be able to switch cropping from middle, left, right etc. like it is explained in the documentation.

Any ideas?
Thank you very much!
Best regards,
Pierre
Hello Pierre,

The type 'thumbnail' editable region is not supported as repeatable. That should explain the problem.

As its alternative, please try the <cms:thumbnail> tag instead - http://docs.couchcms.com/tags-reference/thumbnail.html

As an alternative to using 'repeatable regions', you may try using the 'mosiac' - viewtopic.php?f=5&t=11105. It should work perfectly with the advanced Jcropthumb addon (viewtopic.php?f=8&t=9299).

Hope the reply helps.
2 posts Page 1 of 1