MAGENTO: GET SKIN URL, GET MEDIA URL, GET BASE URL, GET STORE URL
Following code blocks will return magento default urls:
Get Current URL
Get Home URL
Get URL from url key
Get Magento Media Url
Get Magento Skin Url
Get Magento unsecure Skin Url
Get Magento secure Skin Url
Get Magento Store Url
Get Magento Js Url
Skin Url
Media URL
Store URL
Base URL
I hope this will help :)
Mage::helper('core/url')->getCurrentUrl();
Get Home URL
Mage::helper('core/url')->getHomeUrl();
Get URL from url key
Mage::getUrl($urlKey, $params);
Get Magento Media Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
Get Magento Skin Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
Get Magento unsecure Skin Url
$this->getSkinUrl('images/imagename.jpg');
Get Magento secure Skin Url
$this->getSkinUrl('images/imagename.gif', array('_secure'=>true));
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);
Get URL path in STATIC BLOCK
Skin Url
{{skin url='images/sampleimage.jpg'}}
Media URL
{{media url='/sampleimage.jpg'}}
Store URL
{{store url='url_key'}}
Base URL
{{base url='store/key.html'}}
I hope this will help :)
No comments:
Post a Comment