sites/all/modules/views_slideshow/contrib/views_slideshow_singleframe
@@ line 55 in views_slideshow_singelframe.theme.inc,
I think there is a } misplaced for the if statement if ($settings['num_divs'] > 1)
. Makes it only effective for $singleframe['controls'] and not $singleframe['pager'] or $singleframe['image_count']
// Only show controls when there is more than one result.
if ($settings['num_divs'] > 1) {
if ($singleframe['controls'] == 1) {
$vars['controls_top'] = theme('views_slideshow_singleframe_controls', $vss_id, $view, $options);
}
elseif ($singleframe['controls'] == 2) {
$vars['controls_bottom'] = theme('views_slideshow_singleframe_controls', $vss_id, $view, $options);
}
}
if ($singleframe['pager'] == 1) {
$vars['pager_top'] = theme('views_slideshow_singleframe_pager', $vss_id, $view, $options);
}
elseif ($singleframe['pager'] == 2) {
$vars['pager_bottom'] = theme('views_slideshow_singleframe_pager', $vss_id, $view, $options);
}
if ($singleframe['image_count'] == 1) {
$vars['image_count_top'] = theme('views_slideshow_singleframe_image_count', $vss_id, $view, $options);
}
elseif ($singleframe['image_count'] == 2) {
$vars['image_count_bottom'] = theme('views_slideshow_singleframe_image_count', $vss_id, $view, $options);
}
}
I suggest the following change.
// Only show controls when there is more than one result.
if ($settings['num_divs'] > 1) {
if ($singleframe['controls'] == 1) {
$vars['controls_top'] = theme('views_slideshow_singleframe_controls', $vss_id, $view, $options);
}
elseif ($singleframe['controls'] == 2) {
$vars['controls_bottom'] = theme('views_slideshow_singleframe_controls', $vss_id, $view, $options);
}
- }
if ($singleframe['pager'] == 1) {
$vars['pager_top'] = theme('views_slideshow_singleframe_pager', $vss_id, $view, $options);
}
elseif ($singleframe['pager'] == 2) {
$vars['pager_bottom'] = theme('views_slideshow_singleframe_pager', $vss_id, $view, $options);
}
if ($singleframe['image_count'] == 1) {
$vars['image_count_top'] = theme('views_slideshow_singleframe_image_count', $vss_id, $view, $options);
}
elseif ($singleframe['image_count'] == 2) {
$vars['image_count_bottom'] = theme('views_slideshow_singleframe_image_count', $vss_id, $view, $options);
}
+ }
}
I realize its a minor change and is also associated with a template_preprocess function but I'd rather not have to move this code and forever maintain it through future versions, just to have the pager not show up when only one node makes up my slideshow.
Thanks
Comments
Comment #1
redndahead CreditAttribution: redndahead commentedSorry, but this won't get fixed. I know there would be people who would still like the counter and pager to be shown. The controls were the only ones that made absolutely no sense to show.
Comment #2
cybermache CreditAttribution: cybermache commentedHow about adding it as an option within views then? Changing Category to 'feature request' and Status to 'active' to get some feed back on this idea.
If changing the hard code is not an option how about adding something like a select box titled "Display when slide count = 1". I'm sure others would find this feature useful. Maybe in a future version or 6.x or 7.x?
Thanks for entertaining my inquiries.
Comment #3
redndahead CreditAttribution: redndahead commentedComment #4
kenorb CreditAttribution: kenorb commentedSee:
#1211384-4: Views slideshow for 7 seems to be missing singe frame and thunbnail hover
https://drupal.org/node/903244 (3.x - Views Slideshow Tutorial)