Every wonder how you can easily reference URL’s in magento? When developing your store, before going live, many of the url’s you will be using will be based on the stores testing/development url, so when you change the base url from say the development url: to the live url for example: all your urls and image src links will show up as missing. So to save yourself the headache of changing all urls again after launch, just use the Magento Dynamic link shortcodes. So avoid using wysiwyg image/file srcs generated by magento, rather rewite them like this:

<img src=" />
//Rewrite to:
<img src="{{media url='wysiwyg/banner.jpg'}}" />

Here’s the list of all the url code shortcuts for url’s in magento:

Get Url in phtml files

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='/imagename.jpg'}}

4. Get Store Url :

{{store url='mypage.html'}}