Magento Tutorials

Magento How to: get skin url, get media url, get base url, get store url

0
1 0

First of all we will present you how to get skin url, get media url, get base url, get store url to retrieve an URL path in STATIC BLOCK

Q: How to Get skin url?

A: {{skin url=’images/sampleimage.jpg’}}

 

Q: How to Get media url?

A: {{media url=’/sampleimage.jpg’}}

 

Q: How to Get base url?

A: {{base url=’yourstore/mypage.html’}}

 

Q: How to Get store url?

A: {{store url=’mypage.html’

 

Now we will show you how to get skin url, get media url, get base url, get store url to retrieve an URL path in when using .phtml files. Encloding the following code in PHP tags is a MUST.

Q: How to Get Magento Js Url?

A: Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)

 

Q: How to Get Magento Store Url?

A: Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);

 

Q: How to Get Magento Skin Url?

A: Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);

 

Q. How to Get Magento Media Url?

A: Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);

 

Q. How to Get Home URL?

A: $home_url = Mage::helper(‘core/url’)->getHomeUrl();

 

Q. How to Get Current URL?

A: $current_url = Mage::helper(‘core/url’)->getCurrentUrl();

StanleyTips.com is equal with a source of updated IT news including: Google Doodle news, Easter Eggs news, Magento tutorials, WordPress News and Tutorials, Windows tips, Linux tips, SEO tips and more.

Stanley
I am a self made webmaster, blogger, web technology enthusiast and founder of StanleyTips.com.
You may also like
30 Best Magento Fashion Themes 2016
display magento products on homepage
How to get SkinURL in Magento 2

Leave Your Comment

Your Comment*

Your Name*
Your Webpage

− 7 = 2

Enjoy This Article?

Join My Mailing List...

Facebook

Twitter

THANK YOU