« Return to Thread: Request parameters from within view helper

Re: Request parameters from within view helper

by dmitrybelyakov :: Rate this Message:

Reply to Author | View in Thread


admirau wrote:
I want my view helper to return unique string based on controller and action.

Is it possible to get request parameters from within view helper?
In the controller I would write $this->_getParams();
but I don't know how to obtain the same in my view helper.

--
regards
takeshin
Sure! You can grab it any time from the frontController, like this:

$request=Zend_Controller_Front::getInstance()->getRequest();
$requestParams=$request->getParams();

Good luck,
Dmitry.

 « Return to Thread: Request parameters from within view helper