| Zend Pagination and Zend Router |
|
|
|
| Written by Joe |
| Friday, 30 April 2010 14:21 |
|
Using a static route in conjunction with zend paginator prohibits the pagination links (prev/next etc) from passing the 'page' parameter to the url. Instead use a standard route or regexp, for example: http://some-domain.com/index/users To map this url with a custom route do not use: $route = new Zend_Controller_Router_Route_Static( but instead: $route_users = new Zend_Controller_Router_Route( This will map requests correctly for: http://some-domain.com/users http://some-domain.com/users/1 http://some-domain.com/users/2 etc and keeps the pagination links working correctly. Omitting the 'page' value from the array means a request for 'http://some-domain.com/users' would throw an error. |
| Last Updated on Friday, 30 April 2010 20:46 |