* @param Zend_Paginator $this->pages
*/
if ($this->pages->pageCount > 1) {
$url = new URL($_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
$url->purgeEmptyParameters();
echo '
';
// Show the Back button
if (isset($this->pages->previous)) {
$url->page = $this->pages->first;
echo "- First
";
$url->page = $this->pages->previous;
echo "- Back
";
}
// Show the page number links
// Show only $maxNumLinks pages at a time
foreach ($this->pages->pagesInRange as $page) {
$url->page = $page;
$class = ($page == $this->pages->current) ? 'class="current"' : '';
echo "- $page
";
}
// Show the Next button
if (isset($this->pages->next)) {
$url->page = $this->pages->next;
echo "- Next
";
$url->page = $this->pages->last;
echo "- Last
";
}
echo '
';
}