Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The fact that the slideshow doesn't recognize that sometime there is only one attached image and deal with that lead me to fix it, since it's trivially easy.
Here's the simple one-line (plus 1 endbracket) patch:
$output .= '<div class="header">';
+ if ($status['total'] > 1) {
$output .= l(t('Previous'), $slideshow['url'], array('class' => 'previous'), 'slide='. $status['previous']) .' | ';
$output .= t('Image !current of !total', array('!current' => '<span class="current">'. $status['current'] .'</span>', '!total'
=> '<span class="total">'. $status['total'] .'</span>')) .' | ';
$output .= l(t('Next'), $slideshow['url'], array('class' => 'next'), 'slide='. $status['next']);
+ }
$output .= '</div>';
Simply put: only if there is more than one item to display, put the text/links into the header.
Comments
Comment #1
kkaefer CreditAttribution: kkaefer commentedCommitted. Thanks!