• We are available for any Development work:
  • Email us at: programmer_heart@yahoo.com

getBaseUrl – Magento URL Path

If you want to get the source url of an imagejavascript or file, call one of this functions adding your own path at the end.

For  http://www.yourdomain.com
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>

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

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

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

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

2 thoughts on “getBaseUrl – Magento URL Path

Leave a Reply

Your email address will not be published. Required fields are marked *

Current day month ye@r *

Press Enter to Search