Re: [virgodesign] Gallery Image: Display a single record item within a list viewer
Hi Avrom,
Try replacing the foreach loop with something like this:
<?php foreach ($record['images'] as $upload): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>"
width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>" alt="" />
<?php break; ?>
<?php endforeach ?>
Since it's a gallery we can drop the if isImage or if hasThumbnail since we know there will always be images and they'll always have thumbnails. Next, we use the thumbnail variables (eg: thumbUrlPath, etc) to show the thumbnail instead of the full size image. Finally, we add a break on the end to "break out of the loop" after just one pass.
Hope that helps, let me know if that does what you need.
Dave Edis - Senior Developer
interactivetools.com