Anywhere in controller or even with template files.

Mage::app()->getRequest()->getControllerName(); // return controller name
Mage::app()->getRequest()->getActionName(); // return action name
Mage::app()->getRequest()->getRouteName(); // return routes name
Mage::app()->getRequest()->getModuleName(); // return module name

About Author:

Kalpesh Chavada

Kalpesh Chavada is Our Founder & CEO of Akshar Group Technologies. He is serving with 11+ years of experience in different technologies like Magento, WordPress, Laravel, jQuery, Shopify, Branding, and Digital Marketing. He is very good with creative logic and always ready to take on challenges.

Kalpesh Author