Search the Community
Showing results for tags 'bootstrap slider'.
-
hi again, can anyone help me please because my mind will explode.. i have a page with children and i want to create a bootstrap slider with the last 5 page->children that have a specific field page tag. so i have stuck with this ... <?php $i = 1; $tax = $pages->find("template=taxonomy, title=1293|1292"); $slider = $pages->get("/last-news/")->children("$tax, limit=5"); foreach ($slider as $s){ $thumb = $s->images->first(); $activeClass= ''; if ($i === 1) $activeClass = 'active'; echo "<div class='item $activeClass'> <img src='{$thumb}' alt='$s->description'> <div class='carousel-caption'> <h4>Second Thumbnail label</h4> <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> </div> </div>"; $i++; } ?> this code returns 1 image and 4 empty images src thanks