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

I have been searching in the web for these helpful code for Magento 1x and gather together here for my own purpose. But you want use these codes into your project then please go head.

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


Leave a Reply

Your email address will not be published. Required fields are marked *