Forum for discussing general topics related to Couch.
14 posts Page 2 of 2
On my video gallery, although the thumbnails are displayed and the lightbox open when clicked - the videos doesn't load in the lightbox.(easybox)
Here is the code in the video gallery php file.
Code: Select all
<cms:show_repeatable 'videos' ><a href="<cms:show video />" class="lightbox" data-width="480" data-height="320" ></cms:show_repeatable>
<cms:show_repeatable 'video_thumbs' ><img src="<cms:show video_thumb />" class="vidthumb" ></cms:show_repeatable></a>

The video urls specified in the repeater data is in the format:
Code: Select all
http://www.youtube.com/watch?v=INt5H1OCrHc


The I am testing in local server - is that the reason?
Please let me know what I might be doing wrong. Thanks a lot.
I think you need to revisit how you have configured your repeatable regions. Your 'video' and 'video_thumb' editable regions should be inside of one cms:repeatable tag, you shouldn't need two of them. Your current code would generate erroneous markup. If we assume you have two rows in each repeatable table, the markup would look like this:
Code: Select all
<a href="http://www.youtube.com/watch?v=INt5H1OCrHc" class="lightbox" data-width="480" data-height="320">
<a href="http://www.youtube.com/watch?v=INt5H1OCrHc" class="lightbox" data-width="480" data-height="320">

<img src="thumb.jpg" class="vidthumb">
<img src="thumb.jpg" class="vidthumb">

</a>
What we want is the following repeated two times:
Code: Select all
<a href="http://www.youtube.com/watch?v=INt5H1OCrHc" class="lightbox" data-width="480" data-height="320">
<img src="thumb.jpg" class="vidthumb">
</a>
Try placing the 'video_thumb' editable region inside of the 'videos' cms:repeatable and deleting the 'video_thumbs' cms:repeatable. The code would then become:
Code: Select all
<cms:show_repeatable 'videos'>
    <a href="<cms:show video/>" class="lightbox" data-width="480" data-height="320">
        <img src="<cms:show video_thumb/>" class="vidthumb">
    </a>
</cms:show_repeatable>
Thank you so much for your detailed reply.
Gallery working fine now. Thanks again.
Ah, thanks a bunch too, KK, this is something I have been looking for (and yes, I thought cloned pages will be the only option here).

Wat I was thinking of rather than slimbox is a container with the most recent video ready to play as default and a paginated set of smaller thumbnails, which, when clicked, will load and play in that big container. But that is something for ajax or js on front end. But having a slimbox as a backup solution never does any harm.
14 posts Page 2 of 2