Add a class to an image upload
2 posts by 2 authors in: Forums > CMS Builder
Last Post: December 31, 2012 (RSS)
By Ltcomm - December 31, 2012
I recently removed some images from my slideshow and replaced them. Since then my slideshow is no longer animated. I think it is because when I removed the images they no longer have a css class of "lytebox". How would I attach a class of lytebox to an uploaded image?
By Jason - December 31, 2012
Hi,
If you are using an upload field for your images, you should be able to put in the class when you are outputting your images.
For example:
<?php foreach ($record['images'] as $image): ?>
<a href = "<?php echo $image['urlPath'];?>" class = "lytebox" />
<?php endforeach ?>
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/