feh1ks
2/11/2017 - 8:40 PM

DJ Image Slider -- Custom tpl

DJ Image Slider -- Custom tpl

<?php

// no direct access
defined('_JEXEC') or die ('Restricted access');

$wcag = $params->get('wcag', 1) ? ' tabindex="0"' : ''; ?>

<div class="container container-wide">

    <div class="row">

        <?php
            foreach ($slides as $slide) {
            $action = $params->get('link_image',1);
        ?>

        <div class="col-sm-6 col-md-4 col-lg-3">

            <?php if (($slide->link && $action==1) || $action>1) { ?>
                <!-- Link -->
                <a class="" <?php echo $attr; ?> href="<?php echo ($action>1 ? $slide->image : $slide->link); ?>">
            <?php } ?>

            <?php if($slide->image) { ?>
                <!-- Img -->
                <img src="<?php echo $slide->image; ?>" alt="<?php echo $slide->alt; ?>">
            <?php } ?>

            <?php if (($slide->link && $action==1) || $action>1) { ?>
                </a>

                <?php if($params->get('show_title')) { ?>
                    <!-- Heading -->
                    <p class=""><?php echo $slide->title; ?></p>
                <?php } ?>

                <?php if($params->get('show_desc')) { ?>
                    <!-- Text -->
                    <p class=""><?php echo $slide->description; ?></p>
                <?php } ?>

            <?php } ?>

        </div>
        <?php } ?>

    </div>
    <!-- /.row -->

</div>
<!-- /.container -->