Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
I just started using Couch CMS and so far I am very impressed but I have trouble implementing the famous lightbox gallery with it, especially in a manner that can allow the client to edit the gallery. Can anyone please help me with info on how to get on with it? Thank you and much appreciated.
I have decided to add the HTML code for the lightbox gallery I had mentioned in an earlier post to help with the problem solving (this is for one thumbnail):

`<li><a href="img/image_2big.jpg" title="HERITAGE HOTELS: HOLIDAY EXPO 2012"><img src="img/image_2.jpg" width="200" height="150" ></a></li>`
Hi and welcome :)

I think the easiest way for you to implement this in Couch would be to use the 'gallery' feature.
We have a fully illustrated tutorial on how to do so here - ... llery.html

The sample gallery shown in the tutorial uses slimbox but can be very easily modified to use lightbox instead.

Do let us know if you require any help.
Thank you for the reply,
I have tried the example but it seems I am goofing somewhere. I will upload the code for my lightbox page below and please give me pointers on how I can best do this (the lightbox gallery is under a class called 'slides'). Thank you very much. I appreciate it.

<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/grid.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/reset.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen">
<link href='' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" />
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico" />

<div class="container clearfix"><!--start of container-->

<div class="header grid_12"><!--start of header-->

<div class="logo grid_3"><!--start of logo-->
<a href="index.html" title="Little Cribs"><img src="img/logo3.png" alt="Little Cribs"/></a>
</div><!--end of logo-->

<div class="nav" class="grid_9 omega"><!--start of nav id-->
<li><a href="index.html" title="Home"><img src="img/home1.png" alt="Home"/></a></li>
<li><a href="catalogue.html" title="Catalogue" class="active"><img src="img/catalogue1.png" alt="Catalogue"/></a></li>
<li><a href="about.html" title="About Us"><img src="img/about1.png" alt="About Us"/></a></li>
<li><a href="contact.html" title="Contact Us"><img src="img/contact1.png" alt="Contact"/></a></li>
</div><!--end of nav id-->

</div><!--end of header-->

<div class="living-body grid_12"><!--living-body class start-->

<div id='cssmenu' class="grid_2 alpha"><!--css menu start-->
<li class='has-sub'><a href='#'><span>Living units</span></a>
<li><a href='lu-infants.html'><span>Infants</span></a></li>
<li><a href='lu-preteens.html'><span>Preteens</span></a></li>
<li><a href='lu-teens.html'><span>Teens</span></a></li>
<li class='has-sub'><a href='#'><span>Storage units</span></a>
<li><a href='stou-infants.html'><span>Infants</span></a></li>
<li><a href='stou-preteens.html'><span>Preteens</span></a></li>
<li><a href='stou-teens.html'><span>Teens</span></a></li>
<li class='has-sub'><a href='#'><span>Study units</span></a>
<li><a href='stu-infants.html'><span>Infants</span></a></li>
<li><a href='stu-preteens.html'><span>Preteens</span></a></li>
<li><a href='stu-teens.html'><span>Teens</span></a></li>
<li class='has-sub'><a href='#'><span>Accessories</span></a>
<li><a href='acc-infants.html'><span>Infants</span></a></li>
<li><a href='acc-preteens.html'><span>Preteens</span></a></li>
<li><a href='acc-teens.html'><span>Teens</span></a></li>

</div><!--css menu end-->

<div class="itempack grid_10 omega">
<div class="itemimage grid_5">
<img src="img/lui001b.jpg" alt="lui001"/>
<div class="slides">
<li><a href="img/1.jpg" title="Furniture 1"><img src="img/lui001thumb1.jpg" width="90" height="90" alt=""></a></li>
<li><a href="img/1.jpg" title="Furniture 2"><img src="img/lui001thumb1.jpg" width="90" height="90" alt=""></a></li>
<li><a href="img/1.jpg" title="Furniture 3"><img src="img/lui001thumb1.jpg" width="90" height="90" alt=""></a></li>
<li><a href="img/1.jpg" title="Furniture 4"><img src="img/lui001thumb1.jpg" width="90" height="90" alt=""></a></li>
<img src="img/lui001thumb1.jpg" alt="lui001thumb1" class="thumbs"/>
<img src="img/lui001thumb1.jpg" alt="lui001thumb2" class="thumbs"/>
<img src="img/lui001thumb1.jpg" alt="lui001thumb3" class="thumbs"/>
<img src="img/lui001thumb1.jpg" alt="lui001thumb4" class="thumbs"/>-->
<div class="itemdetails grid_4 omega">
<h2>lui001 - Flintstones Bed</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro distinctio consectetur deserunt beatae exercitationem rem nobis temporibus fuga optio necessitatibus sapiente voluptatem eum tempore hic asperiores perspiciatis error sed. Voluptates.</p>
<p>jjjhj;hkl hkhkhklh hkjkhjhh</p>
<p>jjjhj;hkl hkhkhklh hkjkhjhh</p>
<h3>KShs 10,000</h3>

<div class="footer grid_12 clearfix">
<div class="socialmedia grid_12 clearfix"><!--start of socialmedia class-->
<p>&copy; Copyright 2013, Little Cribs. All rights reserved.</p>
<a href="#" target="_blank" title="Facebook"><img src="img/facebook.png" alt="Facebook"/></a>
<a href="#" target="_blank" title="Twitter"><img src="img/twitter.png" alt="Twitter"/></a>
</div><!--end of socialmedia class-->

</div><!--end of container-->
<script src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
<!-- lightBox plugin -->
<script type="text/javascript">
$(function() {
$('.slides a').lightBox();
<!-- lightBox plugin -->
Hi fhuery

Might be easier to use this:

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' />

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>

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.
5 posts Page 1 of 1

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 3 guests