Hi all,
I am trying to add jquery lightbox on all images uploaded on a certain page,
how could I able to modify the template so I could append the class / id to the image or to its <a> tag.
Thanks
adding jquery lightbox on images
- Oliver Georgi
- Site Admin
- Posts: 9909
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: adding jquery lightbox on images
Use the following in your template (maybe the Content Part’s one holding the images, untested):
Put the following code snippet (maybe name it lightbox.php) in your template/inc_script/frontend_render:
Your image template should look like this:
Code: Select all
<!-- INIT_LIGHTBOX -->
Code: Select all
<?php
if(strpos($content['all'], 'INIT_LIGHTBOX')) {
initSlimbox();
}
?>
Code: Select all
<a href="%large-image-source%" rel="lightbox"><img = src="%thumbnail-image-source%" /></a>