Use the ollowing code to get a routes front name:
1 2 |
// will display "config" $frontName = (string)Mage::getConfig()->getNode('frontend/routers/whatever/args/frontName'); |
The code will return “config”, if you add the following XML to your modules config.xml:
1 2 3 4 5 6 7 8 9 10 11 |
<frontend> <routers> <whatever> <use>standard</use> <args> <module>Company_Module</module> <frontName>config</frontName> </args> </whatever> </routers> </frontend> |
Getting the front name of a route programmatically
You want or need help implementing this solution? Maybe you did not find what you were looking for? Contact me and I will assist you with whatever Magento problem troubles you!