You are here

function theme_views_slideshow_singleframe_no_display_teaser in Views Slideshow 6.2

Views Slideshow slideshow elements.

1 theme call to theme_views_slideshow_singleframe_no_display_teaser()
theme_views_slideshow_singleframe_no_display_section in contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc
Add the HTML for the hidden slideshow elements.

File

contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc, line 149
Theme & preprocess functions for the Views Slideshow: SingleFrame module.

Code

function theme_views_slideshow_singleframe_no_display_teaser($items, $vss_id, $count, $length) {
  $current = $count + 1;
  $classes = array(
    'views_slideshow_singleframe_slide',
    "views_slideshow_slide views-row-{$current}",
  );
  if ($count) {
    $classes[] = 'views_slideshow_singleframe_hidden';
  }
  $classes[] = $count % 2 ? 'views-row-even' : 'views-row-odd';
  $attributes['class'] = implode(' ', $classes);
  $attributes['id'] = "views_slideshow_singleframe_div_" . $vss_id . "_" . $count;
  $attributes = drupal_attributes($attributes);
  $output = "<div{$attributes}>";
  foreach ($items as $item_count => $item) {
    $item_class = 'views-row views-row-' . $count;
    $item_class .= $count % 2 ? ' views-row-even' : ' views-row-odd';
    if ($count == 0) {
      $item_class .= ' views-row-first';
    }
    elseif ($count == $length - 1) {
      $item_class .= ' views-row-last';
    }
    $output .= '<div class="' . $item_class . '">' . "\n";
    $output .= $item . "\n";
    $output .= '</div>' . "\n";
  }
  $output .= "</div>\n";
  return $output;
}