If you are in .phtml file use this code:
$this->getRequest()->getActionName();
$this->getRequest()->getControllerName();
$this->getRequest()->getRouteName();
$this->getRequest()->getModuleName();
If you in class file use this code:
Mage::app()->getRequest()->getActionName();
Mage::app()->getRequest()->getControllerName();
Mage::app()->getRequest()->getRouteName();
Mage::app()->getRequest()->getModuleName()
For More :
echo "<pre>";
print_r(Mage::app()->getRequest());
echo "</pre>";
$this->getRequest()->getControllerName();
$this->getRequest()->getRouteName();
$this->getRequest()->getModuleName();
If you in class file use this code:
Mage::app()->getRequest()->getActionName();
Mage::app()->getRequest()->getControllerName();
Mage::app()->getRequest()->getRouteName();
Mage::app()->getRequest()->getModuleName()
For More :
echo "<pre>";
print_r(Mage::app()->getRequest());
echo "</pre>";
Comments
Post a Comment