You are here

field_slideshow.tpl.php in Field Slideshow 7

Same filename and directory in other branches
  1. 7.2 field_slideshow.tpl.php

Template file for field_slideshow

File

field_slideshow.tpl.php
View source
<?php

/**
 * @file
 * Template file for field_slideshow
 *
 *
 */

// Should fix issue #1502772
// @todo: find a nicer way to fix this
if (!isset($controls_position)) {
  $controls_position = "after";
}
if (!isset($pager_position)) {
  $pager_position = "after";
}
?>
<div id="field-slideshow-<?php

print $slideshow_id;
?>-wrapper" class="field-slideshow-wrapper">

  <?php

if ($controls_position == "before") {
  print render($controls);
}
?>

  <?php

if ($pager_position == "before") {
  print render($pager);
}
?>

  <?php

if (isset($breakpoints) && isset($breakpoints['mapping']) && !empty($breakpoints['mapping'])) {
  $style = 'height:' . $slides_max_height . 'px';
}
else {
  $style = 'width:' . $slides_max_width . 'px; height:' . $slides_max_height . 'px';
}
?>

  <div class="<?php

print $classes;
?>" style="<?php

print $style;
?>">
    <?php

foreach ($items as $num => $item) {
  ?>
      <div class="<?php

  print $item['classes'];
  ?>"<?php

  if ($num) {
    ?> style="display:none;"<?php

  }
  ?>>
        <?php

  print empty($item['image']) ? render($item['rendered_entity']) : $item['image'];
  ?>
        <?php

  if (isset($item['caption']) && $item['caption'] != '') {
    ?>
          <div class="field-slideshow-caption">
            <span class="field-slideshow-caption-text"><?php

    print $item['caption'];
    ?></span>
          </div>
        <?php

  }
  ?>
      </div>
    <?php

}
?>
  </div>

  <?php

if ($controls_position != "before") {
  print render($controls);
}
?>

  <?php

if ($pager_position != "before") {
  print render($pager);
}
?>

</div>