Magento get base URL, get skin URL
1. Get Base Url :
1 |
Mage::getBaseUrl(); |
2. Get Skin Url :
1 |
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); |
1) Unsecure Skin Url
1 |
$this->getSkinUrl('images/imagename.jpg'); |
2) Secure Skin url
1 |
$this->getSkinUrl('images/imagename.jpg',array('_secure'=>true)); |
3. Get Media Url :
1 |
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); |
4. Get Js Url :
1 |
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); |
5. Get Store Url :
1 |
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); |
6. Get Current Url
1 |
Mage::helper('core/url')->getCurrentUrl(); |