This is the documentation for an older version of Scroll Viewport. Here you can view the most up-to-date version of the Scroll Viewport documentation.

Pager

Methods

Name Type Description
$pager.hasNext boolean

True if there exists a page succeeding the current one, otherwise false.

$pager.hasPrev boolean

True if there exists a page preceding the current one, otherwise false.

$pager.nextLink String

The link to the succeeding page. If there is no succeeding page, this returns a link to the current page.

$pager.pages List<PagerPage>

A list of the pages that this pager manages.

Can be used to display direct links to the pages, for example like this:

#foreach ($page in $pager.pages)
  <a href="$page.link" class="#if($page.current) current #end">
    $page.number
  </a>
#end

Returns: A list of pager pages.

$pager.prevLink String

The link to the preceding page. If there is no preceding page, this returns a link to the current page.