|
This snippet is best used within your .phtml templates within magento so you aren’t hardcoding links
<?php
echo Mage::getUrl('contact-us/');
?>
|
Get Base URL |
<?php
echo Mage::getBaseUrl();
?>
|
Get Skin URL |
<?php
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
?>
|
Get Media URL |
<?php
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
?>
|
Get JS URL |
<?php
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
?>
|
Get Current URL |
<?php
echo Mage::helper('core/url')->getCurrentUrl();
?>
|