Index: contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow_singleframe.theme.inc,v retrieving revision 1.1.2.1.2.27 diff -u -p -r1.1.2.1.2.27 views_slideshow_singleframe.theme.inc --- contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 4 Jun 2010 03:52:24 -0000 1.1.2.1.2.27 +++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.theme.inc 9 Jul 2010 21:32:04 -0000 @@ -82,14 +82,34 @@ function template_preprocess_views_slide * @ingroup themeable */ function theme_views_slideshow_singleframe_no_display_section($view, $rows, $vss_id, $mode) { + // Retrive the number of itmes per frame + if (isset($view->display_handler->display->display_options['style_options']['views_slideshow_singleframe']['items_per_slide']) && $view->display_handler->display->display_options['style_options']['views_slideshow_singleframe']['items_per_slide'] > 0) { + $items_per_slide = $view->display_handler->display->display_options['style_options']['views_slideshow_singleframe']['items_per_slide']; + } + elseif (isset($view->display['default']->display_options['style_options']['views_slideshow_singleframe']['items_per_slide']) && $view->display['default']->display_options['style_options']['views_slideshow_singleframe']['items_per_slide'] > 0) { + $items_per_slide = $view->display['default']->display_options['style_options']['views_slideshow_singleframe']['items_per_slide']; + } + else { + $items_per_slide = 1; + } + // Add the slideshow elements. $attributes['id'] = "views_slideshow_singleframe_teaser_section_" . $vss_id; $attributes['class'] = 'views_slideshow_singleframe_teaser_section'; $attributes = drupal_attributes($attributes); $output = ""; - foreach ($rows as $count => $item) { - $output .= theme('views_slideshow_singleframe_no_display_teaser', $item, $vss_id, $count); + + $items = array(); + $slide_count = 0; + + for ($i = 0; $i < count($rows); $i++) { + $items[] = $rows[$i]; + if (count($items) == $items_per_slide || $i == (count($rows)-1)) { + $output .= theme('views_slideshow_singleframe_no_display_teaser', $items, $vss_id, $slide_count); + $items = array(); + $slide_count++; + } } $output .= "\n"; @@ -101,7 +121,7 @@ function theme_views_slideshow_singlefra * * @ingroup themeable */ -function theme_views_slideshow_singleframe_no_display_teaser($item, $vss_id, $count) { +function theme_views_slideshow_singleframe_no_display_teaser($items, $vss_id, $count) { $current = $count + 1; $classes = array( 'views_slideshow_singleframe_slide', @@ -116,7 +136,25 @@ function theme_views_slideshow_singlefra $attributes['id'] = "views_slideshow_singleframe_div_" . $vss_id . "_" . $count; $attributes = drupal_attributes($attributes); - return "$item\n"; + $output = ""; + foreach ($items as $item_count => $item) { + $item_class = 'views-row views-row-' . $item_count; + if (!$item_count) { + $item_class .= ' views-row-first'; + } + if ($item_count % 2) { + $item_class .= ' views-row-even'; + } + else { + $item_class .= ' views-row-odd'; + } + $output .= '
' . "\n"; + $output .= $item . "\n"; + $output .= '
' . "\n"; + } + + $output .= "\n"; + return $output; } /** Index: contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views_slideshow/contrib/views_slideshow_singleframe/Attic/views_slideshow_singleframe.views_slideshow.inc,v retrieving revision 1.1.2.1.2.26 diff -u -p -r1.1.2.1.2.26 views_slideshow_singleframe.views_slideshow.inc --- contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 7 Jul 2010 06:19:34 -0000 1.1.2.1.2.26 +++ contrib/views_slideshow_singleframe/views_slideshow_singleframe.views_slideshow.inc 9 Jul 2010 21:32:05 -0000 @@ -32,6 +32,7 @@ function views_slideshow_singleframe_vie 'remember_slide' => array('default' => 0), 'remember_slide_days' => array('default' => 1), 'controls' => array('default' => 0), + 'items_per_slide' => array('default' => 1), 'pager' => array('default' => 0), 'pager_type' => array('default' => 0), 'page_hover' => array('default' => 2), @@ -204,6 +205,12 @@ function views_slideshow_singleframe_vie '#default_value' => $view->options['views_slideshow_singleframe']['image_count'], '#description' => t('Determine if the Image Counter (1 of 4) should be displayed and if so whether they should appear before or after the slideshow.'), ); + $form['views_slideshow_singleframe']['items_per_slide'] = array( + '#type' => 'textfield', + '#title' => t('Items per slide'), + '#default_value' => $view->options['views_slideshow_singleframe']['items_per_slide'], + '#description' => t('The number of items per slide'), + ); $options = array( 'none' => 'none', 'blindX' => 'blindX',