$iCnt = 3; // Go ahead and set it to the max to kick of a new div $iTotalInView = 3; $cClass = ' active'; foreach ($oTechnology as $technology) { if ($technology->IsActive == '1') { $iCnt++; if ($iCnt > $iTotalInView) { if ($cClass == '') { $this_content .= '</div>'; } $this_content .= '<div class="item' . $cClass . '">'; $iCnt = 1; } $this_content .= '<div class="menu-item col-sm-4">'; $this_content .= ' <a data-id="/' . $objTechnology->getPath() . $technology->TechnologyButtonActiveImageUrl . '" href="' . $technology->LinkUrl . '?id=' . $technology->Id . '" class="icon-mousedown"><img src="/' . $objTechnology->getPath() . $technology->TechnologyButtonImageUrl . '" alt="' . $technology->TechnologyName . '"></a>'; $this_content .= ' <a href="' . $technology->LinkUrl . '?id=' . $technology->Id . '">' . $technology->TechnologyName . '</a>'; $this_content .= '</div>'; $cClass = ''; // Turn off active after first item } } $this_content .= '</div>'; $tech_content[$cat->Id] = $this_content; echo " technology_content[" . $cat->Id . "] = '" . $this_content . "';\n"; } ?> var current_cat = <?php echo $_SESSION['sessCategory']; ?> ;
</div> <div class="menu-item menu-nav-item col-sm-3"> <a href="eqp-menu.html"><img src="assets/img/eqp-1.png" alt="Equipment"></a> <a href="eqp-menu.html">Title</a> </div> --> </div> <div class="row row3"> <div class="section white-border-top"> <h2>Equipment Technology</h2> <?php $objTechnology = new Technology(); $oTechnology = $objTechnology->GetAllTechnology('sort_order'); foreach ($oTechnology as $technology) { echo '<div class="menu-item col-sm-4">' . PHP_EOL; echo ' <a data-id="/' . $objTechnology->getPath() . $technology->TechnologyButtonActiveImageUrl . '" href="' . $technology->LinkUrl . '" class="icon-mousedown"><img src="' . $objTechnology->getPath() . $technology->TechnologyButtonImageUrl . '" alt="' . $technology->TechnologyName . '"></a>' . PHP_EOL; echo ' <a href="' . $technology->LinkUrl . '">' . $technology->TechnologyName . '</a>' . PHP_EOL; echo '</div>' . PHP_EOL; } ?> <!-- <div class="menu-item col-sm-4"> <a data-id="tech-sound" href="tech-sound.html" class="icon-mousedown"><img src="assets/img/tech-sound.png" alt="Audio"></a> <a href="tech-sound.html">Audio Reduction</a> </div> <div class="menu-item col-sm-4"> <a data-id="tech-ibeacon" href="tech-ibeacon.html" class="icon-mousedown"><img src="assets/img/tech-ibeacon.png" alt="Ibeacon"></a> <a href="tech-ibeacon.html">iBeacon</a> </div> <div class="menu-item col-sm-4"> <a data-id="tech-light" href="tech-light.html" class="icon-mousedown"><img src="assets/img/tech-light.png" alt="Light"></a>