show image based on order
Hi Ray
In this snippet
<?php $count = 0; // add count and set to zero ?>
<?php
while(!$Gallery->atEnd()) {
?>
<a href="images/gallery_c/<?php echo($Gallery->getColumnVal("GalleryImage")); ?>" class="responsive-picture <?php echo($count === 0)?'mainGalleryImage':'thumbnailGalleryIMage' // check count value and display appropriate class ?> fancybox" data-fancybox-group="gallery" title="<?php echo($Gallery->getColumnVal("GalleryDescription")); ?>">
<picture>
<img alt="<?php echo($Gallery->getColumnVal("GalleryDescription")); ?>" src="/images/gallery_c/<?php echo($count === 0)?'mainImage/campsite.jpg':$Gallery->getColumnVal("GalleryImage"); ?>" <?php echo($count === 0)?'width="1200" height="500"':'width="110" height="100"' ?>>
</picture>
</a>
<?php $count++; // increment count at end of each loop ?>
<?php
$Gallery->moveNext();
}
$Gallery->moveFirst(); //return RS to first record
?>
How would I change
<?php echo($count === 0)?'mainImage/campsite.jpg':$Gallery->getColumnVal("GalleryImage"); ?>
to show the GalleryImage where GalleryOrder = 1 instead of 'mainImage/campsite.jpg?
Cheers
Jamie