theme_pager_detail

Versions
4.6
theme_pager_detail($limit, $element = 0, $format = '%d through %d of %d.')

Format a summary of the current pager position, such as "6 through 10 of 52".

Parameters

$limit The number of query results to display per page.

$element An optional integer to distinguish between multiple pagers on one page.

$format A printf-style format string for customizing the pager text.

Return value

An HTML string that generates this piece of the query pager.

Related topics

Code

includes/pager.inc, line 266

<?php
function theme_pager_detail($limit, $element = 0, $format = '%d through %d of %d.') {
  global $pager_from_array, $pager_total;

  $output = '<div class="pager-detail">';
  if ($pager_total[$element] > (int)$pager_from_array[$element] + 1) {
    $output .= sprintf($format, (int)$pager_from_array[$element] + 1, ((int)$pager_from_array[$element] + $limit <= $pager_total[$element] ? (int)$pager_from_array[$element] + $limit : $pager_total[$element]), $pager_total[$element]);
  }
  $output .= '</div>';

  return $output;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.