MAGENTO: GET SKIN URL, GET MEDIA URL, GET BASE URL, GET STORE URL
Magento skin url, Magento media url, Magento base url, Magento store url, Magento Js Url, Magento current url
To Retrieve URL path in STATIC BLOCKTo get SKIN URL
{{skin url='images/sampleimage.jpg'}}
To get Media URL
{{media url='/sampleimage.jpg'}}
To get Store URL
{{store url='mypage.html'}}
To get Base URL
{{base url=''}}
TO Retrieve URL path in PHTMLNot 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
<?php $current_url = Mage::helper('core/url')->getCurrentUrl();?>
Get Home URL
<?php $home_url = Mage::helper('core/url')->getHomeUrl();?>
Get Magento Media Url
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);?>
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);?>
Get Magento Skin Url
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>
Get Magento Store Url
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>
Get Magento Js Url
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);?>
To Retrieve URL path in STATIC BLOCKTo get SKIN URL
{{skin url='images/sampleimage.jpg'}}
To get Media URL
{{media url='/sampleimage.jpg'}}
To get Store URL
{{store url='mypage.html'}}
To get Base URL
{{base url=''}}
TO Retrieve URL path in PHTMLNot 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
<?php $current_url = Mage::helper('core/url')->getCurrentUrl();?>
Get Home URL
<?php $home_url = Mage::helper('core/url')->getHomeUrl();?>
Get Magento Media Url
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);?>
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);?>
Get Magento Skin Url
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>
Get Magento Store Url
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>
Get Magento Js Url
<?php Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);?>
Please support us, Like us on Facebook.
Subscribe to:
Post Comments (Atom)
Hi,
ReplyDeleteNice tutorial it's worked for me. I searched many post and blog nothing worked for me except this one.....
Thanks