This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @version SEBLOD 3.x More ~ $Id: index.php sebastienheraud $ | |
* @package SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder) | |
* @url http://www.seblod.com | |
* @editor Octopoos - www.octopoos.com | |
* @copyright Copyright (C) 2013 SEBLOD. All Rights Reserved. | |
* @license GNU General Public License version 2 or later; see _LICENSE.php | |
**/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// renders markup for a Bootstrap 3 Carousel from a ProcessWire images array | |
function bsCarouselMarkup($images) { | |
$carouselId = $images->get('page').$images->get('field')->id; | |
$carouselMarkup = "<div id='carousel-$carouselId' class='carousel slide' data-ride='carousel'> | |
<ol class='carousel-indicators'>"; | |
$i = 0; | |
foreach ($images as $image) : | |
$class = ($i == 0) ? " class='active'" : ""; | |
$carouselMarkup .= "<li data-target='#carousel-$carouselId' data-slide-to='$i'$class ></li>"; | |
$i++; |
NewerOlder