2008年9月8日星期一

[fw-mvc] Zend Route passing params to $this->url(

I have searched the archives and there was a simular question to this but no
solution was given so here is my case.

I have the following route.

routes.default.type = "Zend_Controller_Router_Route"
routes.default.route = ":site/:module/:controller/:action"
routes.default.defaults.module = default
routes.default.defaults.controller = index
routes.default.defaults.action = index
routes.default.defaults.site = foo

How do I get the :site variable to carry over to the url view helper without
having to pass it as a parameter everytime?

I would assume that any variables defined in the route should also avaiable
and restored when the url view assembles a url.

If not can some please point me to where I am able to make :site a sepcial
variable like :module or :controller?

--
View this message in context: http://www.nabble.com/Zend-Route-passing-params-to-%24this-%3Eurl%28-tp19384089p19384089.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: