I have a problem using my url view helper. I have defined custom routes like so:
; Index
routes.domain.type = 'Zend_Controller_Router_Route_Static'
routes.domain.route = '/'
routes.domain.defaults.controller = index
routes.domain.defaults.action = index
一切工作正常与自定义的网址,但我无法组装正常没有。 我尝试使用下面的代码从视图中添加链接:Zend:由URL视图助手组装的网址不正确
$this->url(array('controller' => 'search', 'action' => 'index');
的问题是,当我使用索引控制器的我的索引页的代码,返回的URL是当前控制器的URL /行动,而不是我需要的。
呃......当然我应该设置路线的名字为'default'。非常感谢Kees的帮助! – stefan