| 5 pager.inc | theme_pager_previous($text, $limit, $element = 0, $interval = 1, $parameters = array()) |
| 6 pager.inc | theme_pager_previous( |
| 7 pager.inc | theme_pager_previous($variables) |
| 8 pager.inc | theme_pager_previous($variables) |
Format a "previous page" link.
Parameters
$text: The name (or image) of the link.
$limit: The number of query results to display per page.
$element: An optional integer to distinguish between multiple pagers on one page.
$interval: The number of pages to move backward when the link is clicked.
$attributes: An associative array of query string parameters to append to the pager links.
Return value
An HTML string that generates this piece of the query pager.
Related topics
2 theme calls to theme_pager_previous()
File
- includes/
pager.inc, line 171 - Functions to aid in presenting database results as a set of pages.
Code
function theme_pager_previous($text, $limit, $element = 0, $interval = 1, $attributes = array()) {
global $pager_from_array;
$output = '<div class="pager-previous">';
$from_new = pager_load_array(((int) $pager_from_array[$element] - ((int) $limit * (int) $interval)), $element, $pager_from_array);
if ($from_new[$element] < 1) {
$output .= theme('pager_first', $text, $limit, $element, $attributes);
}
else {
$output .= '<a href="' . pager_link($from_new, $element, $attributes) . '">' . $text . '</a>';
}
$output .= '</div>';
return $output;
}
Login or register to post comments