by
1
8
5,132
1
Top 1% !
Popular
Famous
Pearl of Wisdom
Tagged
Refined
OpenSource
MultiPlatform
Popularity: 2419th place
FrameworkMagento
FrameworkZend
LanguagePHP
LicenseMIT_X11

Magento get current controller ,current module , current action and route name

Magento get current controller ,current module , current action and route name
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/734186/Magento-get-current-controller--current-?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
<?php /* *Magento get current controller ,current module , current action and route name */ //1 . controller name Mage::app()->getRequest()->getControllerName();// will return controller name //2. action name Mage::app()->getRequest()->getActionName();//will return action name //3. module name Mage::app()->getRequest()->getModuleName();// will return module name //4. routes name Mage::app()->getRequest()->getRouteName();//will return routes name
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus