|
|||
|
Hi,
I'm using Paginator like this: $select = $this->db->select() ->from(array('mh' => 'merlin_hotel')) ->join(array('mt' => 'merlin_trip') ,'mt.id = mh.trip_id', array() ); $select->where('mh.region = ?',$region); $paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber((int)$this->getRequest()->getParam('page')); $this->view->paginator = $paginator; $this->render("results") but the links that are being rendered later in the pagination_control.phtml do not contain the query parameters that were set before. To achieve that, I have to pass the params from controller to the viewscript and then from the view script to pagination view script and again then merge with 'page' param which is pointless and not making it easier at all. Any hints on that? |
|
|||
|
I am having the same problem... it's not the page and the count that is getting me confused... it's how I can pass URL parameters into the paginator so they are passed into the HREF.
so for example, my URL looks like this: /data/show/1/50/search?field1=5&field2=20 where "1" is my page, "50" is the count of entries to display per page... and field1 and field 2 are my URL parameters I would like to carry with me.. unfortunately, the HREF for the next and previous button only have this: /data/show/1/50/search .. how would I fix this? |
|
|||
|
Infact, what I really want is to keep a url structure of /controller/action/param1/value1/param2/value2/page/1, but I can't find any examples online to help me.
Would you use a GET or POST action in Zend_Form? I'd love to see a tutorial of using Zend_Form, Zend_Paginator and Zend_Db together...a search form would be a perfect example. For now I've modified the pagination control view script like this: PHP Code:
PHP Code:
PHP Code:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|