Hi,
I have a working paginator. I combine Zend Paginator and jQuery to switch between pages. My problem is that the page links only have a range from 1 to 10 but it should be e.g. from 1 to 13. I can get to page 13 by clicking the forward button but the page link 13 is not displayed.
Paginator setup:
$paginator = new Zend_Paginator (
new Zend_Paginator_Adapter_DbSelect ( $programmeList ) );
$paginator->setItemCountPerPage ( 12 )
->setCurrentPageNumber ( $this->_getParam ( 'page', 1 ));
Pass paginator to the view:
if (! $this->_request->isXmlHttpRequest ()) {
$this->view->paginator = $paginator;
} else {
$this->view->currentPage = $paginator->getCurrentPageNumber ();
}
And this is how I print page links:
foreach ( $this->pagesInRange as $page ) {
echo '<a href="#" id="page" page="'.$page.'">' . $page . '</a>';
}
Any ideas?