Feb 142013
 

Sometimes you don’t want all those numbers on your pager. Or you don’t want the text ‘next’ etc. It is very easy to change those in a preprocess. This code changes the number of pages shown in the pager from the default down to 5, and changes the first, next, previous, last text to arrows.

function yourtheme_preprocess_pager(&$variables, $hook) {
  if ($variables['quantity'] > 5) $variables['quantity'] = 5;
  $variables['tags'][0] = '<<';
  $variables['tags'][1] = '<';
  $variables['tags'][3] = '>';
  $variables['tags'][4] = '>>';
}

Add this to your theme’s template.php and replace ‘yourtheme’ with your theme’s name.