<?php $background_height = 300; $slideshow = GraphicSlideshow::ROW($data['id']); $items = $slideshow->getAll(); $num_items = count($items); ?> <div class="GraphicSlideshow"> <div class="GraphicSlideshow-points"> <div class="GraphicSlideshow-points-frame"> <?php for ($i = 0; $i < $num_items; $i++) { ?> <div class="GraphicSlideshow-point" onclick="fake(<?php echo $i; ?> );"></div><?php } ?> </div> </div> <div class="GraphicSlideshow-roll"> <div class="GraphicSlideshow-roll-frame" id="fake"> <?php foreach ($items as $item) { ?> <div id="GraphicSlideshow-item-<?php echo $item->getId(); ?> " class="GraphicSlideshow-item" style="background-image:url('/img/<?php echo $item->getBackground()->getId();
public function getSlideshow() { if ($this->row['Slideshow'] == 0) { return null; } else { return GraphicSlideshow::ROW($this->row['Slideshow']); } }