Get base Url, Skin Url, Media Url in both phtml files and cms pages or static blocks – Magento 1x

I have been searching on the web for these helpful codes for Magento 1x and I have gathered them together here for my
own purpose. But if you want to use these codes in your project then please go ahead.

Get the URL in CMS pages and Static Blocks

1. Base URL

 {{store url=""}}

2. Skin URL

 {{skin url='imagefolder/image.png'}}

3. Media URL

 {{media url="/image.png"}}

4. Store URL

 {{store url="pagename.html"}}

Get the URL in phtml file

1. Base URL


2. Skin URL


2.1 Secure URL

 $this->getSkinUrl('imagefolder/image.png', array('_secure'=>true));

2.2 Unsecure URL


3. Current URL


4. Js URL


5. Store URL


6. Media URL


Related Posts: