SHOWING THE FIRST LIGHTBOX OR MILKBOX GALLERY IMAGE ON A LIST PAGE - Aug 3rd, 2010


CMSB users Nigel Gordijk and northernpenguin wanted to be able to show the first image from a lightbox gallery on a list
page of galleries.

I had suggested that they add a single list page image upload field to their gallery record.

This would allow them to choose the "PR" image for their list page separate from the gallery images, so when a visitor
clicks on the gallery they wouldn’t immediately see the same image.

Flamerz suggested inserting the following inside the main foreach loop on the list page.



<?php if ($record['uploads'][0]['hasThumbnail']): ?>
<img src="<?php echo $record['uploads'][0]['thumbUrlPath'] ?>" width="<?php echo $record['uploads'][0]['thumbWidth'] ?>"
height="<?php echo $record['uploads'][0]['thumbHeight'] ?>" alt="" /><br />
<?php endif ?>




The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service