This is a simple HTML page to give a very basic demonstration of how to setup gallery of images and make them editable using CushyCMS.
Caveat: this solution requires javascript, and uses repeatable regions in CushyCMS which are only part of the pro features$(document).ready(function() { $('ul.gallery li').each(function() { // Find the main image for this particular fancybox element. var image = $(this).find('img.main').first(); var thumb = $(this).find('img.thumbnail').first(); var desc = $.trim($(this).find('h5.description').first().html()); var link = $(this).find('a.fancybox').first(); // Set the href for each link to be the src of the main image inside that link (which is currently hidden). link.attr('href', image.attr('src')); // Also remove the src from the main image so the browser doesn't download it. image.attr('src', ''); // Fix the title & alt tags of the thumbnail. thumb.attr('title', desc); thumb.attr('alt', desc); link.attr('title', desc); // We're ready to enable the fancybox! link.fancybox({ helpers: { title: { type: 'inside' } } }); }); });
The basics for this particular implementation should hopefully be pretty easy to follow. Here are some things to note if you view the source of the above gallery.
Here is a screenshot of how this looks to your editor. We have only taken a sample of the edit boxes for one of the images above. This will of course be repeated for all 3 images. As you can see in the top right, there are control buttons for your editor to clone the entire editable group. This will clone the whole <li> element from the example code.