Book Image

concrete5 Beginner's Guide

Book Image

concrete5 Beginner's Guide

Overview of this book

Table of Contents (19 chapters)
concrete5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – creating a gallery template for a slideshow


Create a gallery slideshow template by following these steps:

  1. We're going to use the same JavaScript as we've used with the picture pop-up template for the content block. Go to jQuery lightbox at http://leandrovieira.com/projects/jquery/lightbox/ and download the jQuery lightbox ZIP file.

  2. Create a new directory named blocks/slideshow/templates/gallery.

  3. From the downloaded jQuery ZIP file, extract the folders images, css, and js but make sure there's only jquery.lightbox-0.5.min.js in it—you have to remove the other JavaScript files.

  4. Create a new file called view.php in the directory. We're not going to copy the original view.php as we have to rewrite most of the code anyway. The following code block shows you the complete content of our view.php; it's a lot smaller than the default slideshow template:

    <div class="ccm-slideshow-gallery">
    <?php 
    defined('C5_EXECUTE') or die(_("Access Denied."));
    
    foreach($images as $imgInfo...