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
File
- includes/
pager.inc, line 266 - Functions to aid in presenting database results as a set of pages.
Code
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;
}