Zend framework routing params

329 views Asked by At

I have several routes defined in my application. When route A is matched and I assemble an URL using route B without resetting, it does not include the current request parameters.

Is there an easy way to include all the request parameters when assembling an URL via a different route than the current route? I did have a look at Zend_Controller_Router_Rewrite->useRequestParametersAsGlobal, but this will (obviously) also include the request parameters when reset = true

1

There are 1 answers

0
Raj On

You could try the following.

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

Pass

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

to your URL view helper.