To Retrieve URL path in STATIC BLOCKphp
To get SKIN URLhtml
{{skin url= 'images/sampleimage.jpg ' }} |
To get Media URLthis
{{media url= '/sampleimage.jpg' }} |
To get Store URLurl
{{store url= 'mypage.html' }} |
To get Base URLspa
{{base url= 'yourstore/mypage.html' }} |
Note: In editing PHTML don’t forget to enclode the following code with PHP tagcode
Not secure Skin URL:htm
<?php echo $this ->getSkinUrl( 'images/sampleimage.jpg' ) ?> |
Secure Skin URLget
<?php echo $this ->getSkinUrl( 'images/ sampleimage.gif' , array ( '_secure' =>true)) ?> |
Get Current URLit
$current_url = Mage::helper( 'core/url' )->getCurrentUrl(); |
Get Home URLtable
$home_url = Mage::helper( 'core/url' )->getHomeUrl(); |
Get Magento Media Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); |
Get Magento Media Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); |
Get Magento Skin Url
1 |
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); |
Get Magento Store Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); |
Get Magento Js Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); |