I know it must be quite a stupid question, but i can't manage to change the usual "previous" "next" text in a view pager for a png image of an arrow i want to use.
any ideas? I'm actually trying with this overriding:

function phptemplate_pager($tags = array(), $limit = 5, $element = 0, $parameters = array()) {
  global $pager_total;
  $output = '';

  if ($pager_total[$element] > 1) {
    $output .= '<div id="paginacion"><table width="450px" border="0" cellspacing="0" cellpadding="10"><tr><td width="45" align="left">';
	$output .= theme('pager_previous', ($tags[1] ? $tags[1] : t('previous')), $limit, $element, 1, $parameters);
    $output .= '</td><td width="315" align="center">';
    $output .= theme('pager_list', $limit, $element, ($tags[2] ? $tags[2] : 9 ), '', $parameters);
    $output .= '</td><td width="45" align="right">';
    $output .= theme('pager_next', ($tags[3] ? $tags[3] : t('next')), $limit, $element, 1, $parameters);
    $output .= '</td></tr></table></div>';

    return $output;
  }
}

any idea?
thanks

Comments

Roelven’s picture

I also ran into this issue, it seems impossible to add html code within that function.
The problem is noted here as well, but no solution provided.

Example:

 theme('pager_previous', (isset($tags[1]) ? $tags[1] : '« previous'), $limit, $element, 1, $parameters);

This is a codesnippet from Drupal 6 from theme_pager();

It's not allowed to change 'previous' for some html code, the theme function will filter it and display it as plain text. Very unfortunate, I'd like to have an image + html code in there..

Roelven’s picture

Update: I fixed it for Drupal 6:
http://drupal.org/node/318565

etrangerequitraverselaville’s picture

great!

xabooth’s picture

You can also just override the css, each pager items have classes you can override.
Using background images and text-indent:-9999em; :)
- Alexa -