2011-02-18 126 views
1

我在我的应用程序中定义了几条路由。 当路由A匹配并且我使用路由B组装URL而不重置时,它不包含当前的请求参数。Zend框架路由参数

当通过与当前路线不同的路线组装URL时,是否有简单的方法来包含所有请求参数? 我看过Zend_Controller_Router_Rewrite-> useRequestParametersAsGlobal,但是当(显然)reset = true时,它也会包含请求参数。

+1

你使用`url` helper吗?如果是,请显示代码如何操作。 – singles 2011-02-18 15:36:43

回答

0

您可以尝试以下操作。

$oldParams = $this->_getAllParamas(); 
unset($oldParams['module']); 
unset($oldParams['controller']); 
unset($oldParams['action']); 

array_merge(array('new'=>'param'),$oldParams) 

到您的网址视图助手。