|
|||
|
Hi Folks,
I've only just started using the Paginator and don't quite seem to be getting it to work. I have the data in the function, but can't seem to access the Next/Previous properties when I try to produce the Next/Previous 1/2/3 etc links. My coding is as follows, although I found the documentation quite difficult to follow on the main website. $paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Array($prods)); Zend_Paginator::setDefaultScrollingStyle('Sliding' ); Zend_Loader::loadClass('Zend_View'); $view = new Zend_View(); $view->setScriptPath(realpath("views/scripts")); Zend_View_Helper_PaginationControl::setDefaultView Partial('my_page.phtml'); $paginator->setView($view); $paginator->setCurrentPageNumber($page_num); $paginator->setItemCountPerPage(4); $view->paginationControl($paginator, 'Sliding', 'my_page.phtml'); $view->paginator = $paginator; $view->render('my_page.phtml'); What am I missing / doing wrong? Do I even need a view object, as I'd prefer not to have it and just produce the links/menu myself. Any help would be great. Thanks A p.s for example - I can't then access $this->pageCount (or even if I go $this->paginator = $paginator or $view->paginator) Last edited by PHP_coder : 10-03-2008 at 08:34 AM. Reason: Missed something |
![]() |
| Thread Tools | |
| Display Modes | |
|
|