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 .= '';
$output .= theme('pager_first', ($tags[0] ? $tags[0] : t('⇤ first')), $limit, $element, $parameters);
$output .= theme('pager_previous', ($tags[1] ? $tags[1] : t('‹ 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 ›')), $limit, $element, 1, $parameters);
$output .= theme('pager_last', ($tags[4] ? $tags[4] : t('last ⇥')), $limit, $element, $parameters);
$output .= '';
return $output;
}
}

and updated dark_pager_link() as follows
if (!isset($titles)) {
$titles = array(
t('⇤ first') => t('Go to first page'),
t('‹ previous') => t('Go to previous page'),
t('next ›') => t('Go to next page'),
t('last ⇥') => t('Go to last page'),
);
}

All is right again.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is used to make sure you are a human visitor and to prevent spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.
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 5 guests online.

pair Networks