How to get Current Page URL, Module, Controller and Action Name, CMS Page URL and Current Skin URL in Magento


Mage::app()->getFrontController()->getRequest()->getModuleName();  //Get Current Module Name
Mage::getSingleton(‘cms/page’)->getIdentifier();  // Get Current CMS page
Mage::app()->getFrontController()->getRequest()->getRouteName();  // Get Route Name
Mage::getSingleton(‘cms/page’)->getIdentifier();  // Get Identifier Name

Mage::getDesign()->getSkinUrl(); // Get Current Skin URL


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s