Magento Get URL on php and phtml pages -Magento URL Function |

Magento Get URL on php and phtml pages -Magento URL Function

With the below code you can get all the Magento URL related methods like Base URL, Skin URL, Unsecure Skin URL, Media URL, Js URL, Store URL, Current URL, Store Page URL, Store Page URL without slash

1. Get Base Url :


2. Get Skin Url :


(a) Unsecure Skin Url :


(b) Secure Skin Url :

$this->getSkinUrl('images/imagename.gif', array('_secure'=>true));

3. Get Media Url :


4. Get Js Url :


5. Get Store Url :


6. Get Current Url


Get Url in cms pages or static blocks

1. Get Base Url :

{{store url=""}}

2. Get Skin Url :

{{skin url='images/imagename.jpg'}}

3. Get Media Url :

{{media url='//'}}

4. Get Store Page Url :

{{store url='contacts'}}

5. Get Store Page URL Direct link without “/”

{{store direct_url="my-page.html"}}

About the author: ShareSoftAdmin

Leave a Reply

Your email address will not be published.