Same name in other branches
  1. 7.x-3.x contrib/views_slideshow_cycle/theme/views_slideshow_cycle.theme.inc \template_preprocess_views_slideshow_cycle_main_frame_row_item()
  2. 8.x-3.x modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc \template_preprocess_views_slideshow_cycle_main_frame_row_item()
  3. 8.x-4.x modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc \template_preprocess_views_slideshow_cycle_main_frame_row_item()

Views Slideshow slideshow row items.

Related topics

File

modules/views_slideshow_cycle/views_slideshow_cycle.theme.inc, line 176

Code

function template_preprocess_views_slideshow_cycle_main_frame_row_item(&$vars) {
    $vars['attributes']['class'][] = 'views-row views-row-' . $vars['count'];
    $vars['attributes']['class'][] = $vars['count'] % 2 ? 'views-row-even' : 'views-row-odd';
    if ($vars['count'] == 0) {
        $vars['attributes']['class'][] = 'views-row-first';
    }
    elseif ($vars['count'] == $vars['length'] - 1) {
        $vars['attributes']['class'][] = 'views-row-last';
    }
    // Support custom row classes.
    if ($row_class = $vars['view']->style_plugin
        ->getRowClass($vars['count'])) {
        $vars['attributes']['class'][] = $row_class;
    }
}