HOW TO GET GET BASE URL, SKIN URL, GET MEDIA URL, GET STORE URL AND OTHER URLS IN MAGENTO?
HOW TO GET GET BASE URL, SKIN URL, GET MEDIA URL, GET STORE URL AND OTHER URLS IN MAGENTO?
HERE IS SOME USEFULL URL FOR YOU WHICH CAN HELP YOU TO USE THE DEFINE URL IN MAGENTO
HOPE THIS WILL HELP YOU.
To get Media URL
{{media
url='/sampleimage.jpg'}}
To get Store URL
{{store
url='mypage.html'}}
To get Base URL
{{base
url='yourstore/mypage.html'}}
TO Retrieve URL path in
PHTML
Note: In editing PHTML don't forget to enclode
the following code with PHP tag
Not secure Skin URL:
Not secure Skin URL:
<?php
echo $this->getSkinUrl('images/sampleimage.jpg') ?>
Secure Skin URL
<?php
echo $this->getSkinUrl('images/ sampleimage.gif', array('_secure'=>true))
?>
Get Current URL
$current_url
= Mage::helper('core/url')->getCurrentUrl();
Get Home URL
$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
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);
{{skin url='images/sampleimage.jpg '}}
Comments
Post a Comment