routes.context.type = "Zend_Controller_Router_Route_Regex"
routes.context.route = "context/(.+)"
routes.context.defaults.module = "context"
routes.context.defaults.controller = "index"
routes.context.defaults.action = "index"
routes.context.map.1 = "context"
routes.context.reverse = "context/%s"
and made available in Bootstrap:
$router->addConfig($config, "routes");
After some pre-processing, the request is forwarded to the search controller
of another module:
$context = $request->get("context");
$contextID = $this->findContextID($context); //... pre-processing
return $this->_forward("index", "search", "items");
The search controller lists results and uses Zend_Paginator to render the
pagination. When calling the search controller directly, Zend_Paginator
properly renders the pagination. But, when forwarding the request as
described above, the 'page' attribute does not get set in the paginator's
pagesInRange array. As a result, the url looks like this:
/context/whatever_the_context_is
instead of
/context/whatever_the_context_is/page/[page number]
What do I have to be aware of when using Zend_Paginator in conjunction with
Zend_Controller_Router_Route_Regex?
--
View this message in context: http://www.nabble.com/Zend_Paginator-does-not-render-the-%27page%27-attribute-when-using-Zend_Controller_Router_Route_Regex-tp22941489p22941489.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论