tag:blogger.com,1999:blog-7808083316589260085.post8251292090580001386..comments2023-05-12T15:45:57.727+05:30Comments on Magento Blog: How to get Current page url in magentoAnonymoushttp://www.blogger.com/profile/00622300376257624773noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7808083316589260085.post-54792925800418837052013-08-13T14:04:18.509+05:302013-08-13T14:04:18.509+05:30$currentUrl = Mage::helper('core/url')->...$currentUrl = Mage::helper('core/url')->getCurrentUrl()<br />or<br /><br />$currentUrl = Mage::getUrl('*/*/*', array('_current' => true));<br />above code may not work always as expected. <br />Better way to find the current url is to use the following code:<br /><br />if (!in_array(Mage::app()->getFrontController()->getAction()->getFullActionName(), array('cms_index_noRoute', 'cms_index_defaultNoRoute'))) {<br /> $currentUrl = Mage::helper('core/url')->getCurrentUrl();<br />}<br />Source: http://www.blog.magepsycho.com/how-to-find-current-url-in-magento/Anonymoushttps://www.blogger.com/profile/01553974286408481957noreply@blogger.comtag:blogger.com,1999:blog-7808083316589260085.post-16070633550366809532011-05-14T18:12:25.096+05:302011-05-14T18:12:25.096+05:30thanks it helps :-)thanks it helps :-)Anonymousnoreply@blogger.com