Created
June 6, 2019 11:08
-
-
Save hans2103/df20e6f921fa3e713f705d8f4e6d6d62 to your computer and use it in GitHub Desktop.
Joomla alternate layout mod_articles_category for Bootstrap 2 Slideshow
This file contains 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 | |
/** | |
* @package Joomla.Site | |
* @subpackage mod_articles_category | |
* | |
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
defined('_JEXEC') or die; | |
$count = count($list); | |
?> | |
<div id="myCarousel" class="carousel slide" data-ride="carousel"> | |
<ol class="carousel-indicators"> | |
<?php for ($i = 0; $i < $count; $i++) : ?> | |
<li data-target="#myCarousel" data-slide-to="<?php echo $i; ?>" | |
class="<?php echo $i == 0 ? 'active' : ''; ?>"></li> | |
<?php endfor; ?> | |
</ol> | |
<div class="carousel-inner"> | |
<?php for ($i = 0; $i < $count; $i++) : ?> | |
<?php $images = json_decode($list[$i]->images); ?> | |
<div class="item <?php echo $i == 0 ? 'active' : ''; ?>"> | |
<?php /*<img src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="">*/ ?> | |
<img src="https://picsum.photos/700/300" alt=""> | |
<div class="carousel-caption"> | |
<?php if ($params->get('item_title')) : ?> | |
<h4><?php echo $list[$i]->title; ?></h4> | |
<?php endif; ?> | |
<?php echo $list[$i]->introtext; ?> | |
</div> | |
</div> | |
<?php endfor; ?> | |
</div> | |
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a> | |
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment