displaying content
Hey Ray
Just wondering how I would, using this one recordset I could return the first record as the mainImage and then any other records get displayed as a submimage within the repeat region? Cheers, Jamie
<?php
$_GET["GalleryContent"] = "gallery_".$PageContents->getColumnVal("ProductContentsID");?>
<?php
$Gallery = new WA_MySQLi_RS("Gallery",$DBConnection,0);
$Gallery->setQuery("SELECT * FROM gallery_category WHERE GalleryPage = ? AND Live = 1 ORDER BY GalleryOrder ASC");
$Gallery->bindParam("s", "".$_GET['GalleryContent'] ."", "-1"); //colname
$Gallery->execute();?>
<div class="container container-1">
<a href="./images/gallery_c/<?php echo($Gallery->getColumnVal("GalleryImage")); ?>" class="responsive-picture mainIMage fancybox" data-fancybox-group="gallery"><picture><img alt="Placeholder Picture" src="./images/gallery_c/<?php echo($Gallery->getColumnVal("GalleryImage")); ?>"></picture></a>
<?php
while(!$PageContents->atEnd()) {
?>
<a href="./images/gallery_c/<?php echo($Gallery->getColumnVal("GalleryImage")); ?>" class="responsive-picture subImage fancybox" data-fancybox-group="gallery">
<picture><img alt="Placeholder Picture" src="./images/gallery_c/<?php echo($Gallery->getColumnVal("GalleryImage")); ?>"></picture>
</a>
<?php
$PageContents->moveNext();
}
$PageContents->moveFirst(); //return RS to first record
?>
</div>