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)

Returns HTML for 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.

$parameters: 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

1 theme call to theme_pager_next()

File

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

Code

function theme_pager_next($text, $limit, $element = 0, $interval = 1, $parameters = array()) {
  global $pager_page_array, $pager_total;
  $output = '';

  // If we are anywhere but the last page
  if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {
    $page_new = pager_load_array($pager_page_array[$element] + $interval, $element, $pager_page_array);
    // If the next page is the last page, mark the link as such.
    if ($page_new[$element] == ($pager_total[$element] - 1)) {
      $output = theme('pager_last', $text, $limit, $element, $parameters);
    }
    // The next page is not the last page.
    else {
      $output = theme('pager_link', $text, $page_new, $element, $parameters);
    }
  }

  return $output;
}

Comments

use an image as pager link

$text The name (or image) of the link.

How do I use an image? I've tried passing the path to the file, and

$nextimg = theme_image("files/designElements/thisWay.png");
$nextlink =  theme_pager_next($nextimg,10);
print $nextlink;

but this of course replaces all my < and > with &lt; and &gt...

Thanks kindly!

true, I recomment u this

true,

I recomment u this article, according to that there is a mistake in theme_pager_link function. Works for me, cheers!

http://drupal.org/node/318565

Login or register to post comments