Zend paginator - Sayfa Linkler

0 Cevap php

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. alt text

Paginator kurulumu:

$paginator = new Zend_Paginator ( 
    new Zend_Paginator_Adapter_DbSelect ( $programmeList ) );
$paginator->setItemCountPerPage ( 12 )
    ->setCurrentPageNumber ( $this->_getParam ( 'page', 1 ));

Görünümüne sayfa numaralarını Pass:

if (! $this->_request->isXmlHttpRequest ()) {
    $this->view->paginator = $paginator;
} else {
    $this->view->currentPage = $paginator->getCurrentPageNumber ();
}

Ve bu sayfa bağlantıları yazdırmak nasıl:

foreach ( $this->pagesInRange as $page ) {
    echo '<a href="#" id="page" page="'.$page.'">' . $page . '</a>';
}

Herhangi bir fikir?

0 Cevap