theme_pager_next

5 pager.inc theme_pager_next($text, $limit, $element = 0, $interval = 1, $parameters = array())
6 pager.inc theme_pager_next($text, $limit, $element = 0, $interval = 1, $parameters = array())
7 pager.inc theme_pager_next($variables)
8 pager.inc theme_pager_next($variables)

Format a "next 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 forward 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

3 theme calls to theme_pager_next()

File

includes/pager.inc, line 203
Functions to aid in presenting database results as a set of pages.

Code

function theme_pager_next($text, $limit, $element = 0, $interval = 1, $attributes = array()) {
  global $pager_from_array, $pager_total;
  $output = '<div class="pager-next">';
  $from_new = pager_load_array(((int) $pager_from_array[$element] + ((int) $limit * (int) $interval)), $element, $pager_from_array);
  if ($from_new[$element] < $pager_total[$element]) {
    $output .= '<a href="' . pager_link($from_new, $element, $attributes) . '">' . $text . '</a>';
  }
  else {
    $output .= ' ';
  }
  $output .= '</div>';
  return $output;
}
Login or register to post comments