How to get current URL on phtml files

Simple tip where you will get the code to “extract” current Magento url from a template file.

Here is the code.

You can use it on any phtml file.

$this->helper('core/url')->getCurrentUrl() 


Behind the scenes, this calls a helper method and retrieves the current url.

You can also use this on any file by changing it to this code:

Mage::helper('core/url')->getCurrentUrl() 


Posted by .(JavaScript must be enabled to view this email address) on 02/14 at 02:43 PM

Classic Dresses Quality material,amazing dress Party Dresses Formal Dresses Prom Dresses Sweet 16 Dresses mother of the bride formal gowns, apparel Quinceanera Dresses First Communion Dresses Cocktail Dresses offer distinct design and superior style. Choose from mother of skirt sets Evening Dresses Celebrity Dresses.

Posted by Party Dresses  on  01/30  at  10:59 PM

XPressXrun Greetings… your blog is very interesting and beautifully written. http://excellent.groupsite.com/ - synthroid medication

Posted by buy synthroid  on  03/04  at  11:09 AM

XPressXrun Greetings… your blog is very interesting and beautifully written. http://excellent.groupsite.com/ - buy synthroid

Posted by synthroid  on  03/08  at  10:12 AM
Page 1 of 1 pages
Commenting is not available in this weblog entry.

<< Back to main