You can get the current page url as follows:
$uri = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri(); // or using userAgent view helper: $uri = $this->userAgent()->getServerValue('request_uri');
A helper of the form $this->userAgent() returns an instance of Zend_Http_UserAgent , which can provide you with a lot of useful information.
If you want to get an action in your views, you can get it as follows:
Zend_Controller_Front::getInstance()->getRequest()->getActionName();
Not sure what you mean by โchange of actionโ. Do you want to change it when you echo it or want to redirect the user. Anyway, hope this helps.
source share