Updated the navigation controls in drupal

paddy's picture

While working on customising my theme, I noticed that all the symbols with the 'first', 'previous', 'next' and 'last' all ended up as question marks.I changed them to their numerical equivalent, and even though the symbols re-appeared, my HTML validator plugin in FF complained.So I did the following..

function dark_pager($tags = array(), $limit = 10, $element = 0, $parameters = array()) {
  global $pager_total;
  $output = '';
  if ($pager_total[$element] > 1) {
    $output .= '<div class=“pager“>';
    $output .= theme('pager_first', ($tags[0] ? $tags[0] : t('&amp;amp;#8676; first')), $limit, $element, $parameters);
    $output .= theme('pager_previous', ($tags[1] ? $tags[1] : t('&amp;amp;#8249; previous')), $limit, $element, 1, $parameters);
    $output .= theme('pager_list', $limit, $element, ($tags[2] ? $tags[2] : 4 ), '', $parameters);
    $output .= theme('pager_next', ($tags[3] ? $tags[3] : t('next &amp;amp;#8250;')), $limit, $element, 1, $parameters);
    $output .= theme('pager_last', ($tags[4] ? $tags[4] : t('last &amp;amp;#8677;')), $limit, $element, $parameters);
    $output .= '</div>';
    return $output;
  }
}

and updated dark_pager_link() as follows
    if (!isset($titles)) {
      $titles = array(
        t('&amp;amp;#8676; first') => t('Go to first page'),
        t('&amp;amp;#8249; previous') => t('Go to previous page'),
        t('next &amp;amp;#8250;') => t('Go to next page'),
        t('last &amp;amp;#8677;') => t('Go to last page'),
      );
    }

All is right again.

Get Firefox W3C Markup Validation Service W3C CSS Validation Service drupal.org | Community Plumbing Taylor McKnight  -  //gtmcknight Creative Commons License Irish

Syndicate

Syndicate content

Who's online

There are currently 0 users and 0 guests online.

pair Networks