Get Skin, Media, Base, Js, Image URLs in Magento

In magento we always need urls in phtml files.

Magento is a huge platform. It cannot be explain in one blog. But most of the developers wants the base_url, skin_url, media_url, current_url and many more. In that case you need search on google and find what is the appropriate codes for those. So I am making your task easy by writing this post where you can find the most used url codes. I you need more urls then you can comment so that I can modify my post.

So here you can find some most used codes to get magento urls in phtml files:

Get Store Url:
like: http://www.sukumartech.com/


Get Base Url:
like: http://www.sukumartech.com/


Get Media Url:
like: http://www.sukumartech.com/media/


Get Skin Url:
like: http://www.sukumartech.com/skin/


and
like: http://www.sukumartech.com/skin/frontend/your_package/your_template/


skin url out side magento store


Get Js Url:
like: http://www.sukumartech.com/js/


or


Get Skin Image Url:


How to get urls in cms blocks and cms pages:

Get Base Url :

{{store url=""}}

Get Media Url :

{{media url=''}}

Get Skin Url :

{{skin url=''}}

Get Skin Image Url :

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

Cheers!!!

You may also like

Leave a Reply

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