public function getTeaser() { $result = $this->db->select("news_teaser"); foreach ($result as $key => $r) { $return['teaser' . $key . '_title'] = $r['titel']; $return['teaser' . $key . '_text'] = $r['html']; $return['teaser' . $key . '_img'] = $this->imgPath . "teaser/" . $r['img']; $return['teaser' . $key . '_link'] = Navigation::getLink($r['link_id']); $return['teaser' . $key . '_type'] = $r['type'] == 0 ? "small" : "wide"; } return $return; }
<div id="news"> <div class="news" id="img1" style='background: transparent url("../../images/top_images/<?php echo $top['image']; ?> ") no-repeat scroll 50% center / auto 1080px;' > <div id="vid1_div"></div> <div class="text"> <h1 id="title1"><?php echo $top['title']; ?> </h1> <?php if ($top['link'] != null) { ?> <div id="link1"> <a id="alink1" href="<?php echo Navigation::getLink($top['link']); ?> "><?php echo $top['linkText']; ?> </a> </div> <?php } ?> </div> </div> </div>