Monday, September 15, 2014

Magento - getBaseUrl retrieving different urls

Magento getBaseUrl retrieving different urls


There are multiple ways for examples:- 
 
1. http://yourdomain.com/
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>

2. http://yourdomain.com/index.php/
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); ?>

3.http://yourdomain.com/js/
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?>

4.http://yourdomain.com/media/
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>

5.http://yourdomain.com/skin/
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>

 

No comments :

Post a Comment