Hi all,
I have just sent the below message from a different account, but there
seems to have been some problem in my subscription and the message
hasn't been circulated. I have checked the archives and can only
apologise if the message does finally appear and I end up double
posting.
A simple one I hope... I'm trying to put together a redirect request,
based on parameters from an original request. Essentially, I want to
replace one parameter and then redirect the request with all the
additional original parameters. I could do something like this, but
can't help thinking there must be a nicer way.
$params = $this->_getAllParams();
$params['new_param'] = 'some new param value';
unset($params['old_param']);
unset($params['action']);
unset($params['controller']);
unset($params['module']);
$this->_helper->Redirector->gotoRoute($params,'newRoute');
Obviously the bit I'm most unhappy about is having to unset the
controller, action and module name to prevent these being passed as
params to the new route. I thought $this->_request->getUserParams()
might have done the trick, but unfortunately not.
It works, but its not nice... Any advice most welcome.
:wq