How to Get Current module name, controller name, route name and action name in Magento?

Magento Get current module name, controller name, route name and current action name
To find these important values you need to understand the use of below code with effective measures. With this code you can find the values from current URL anywhere in controller or even at template files.

Magento Get current module name:

// will return current module name

Magento Get Current Route Name:

//will return routes name

Magento Get Current Controller Name:

// will return controller name

Magento Get current Action name:

//will return action name

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *