Magento mage core, admin static blocks, or phtml edits are usually supported des getting URL path such images, JavaScript, base URL, media and store URL. there are different ways to retrieve mentioned URL paths depending on where section you're editing.
To retrieve URL path in static Block
To 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='yourstore/mypage.html'}}
To retrieve URL path in phtml
Note: In Editing phtml don't forget to enclode the following code with PHP tag
Not 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
$current_url = Mage::helper('core/url')->getCurrentUrl();
Get home URL
$home_url = Mage::helper('core/url')->getHomeUrl();
Get magento media URL
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
Get magento media URL
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
Get magento skin URL
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
Get magento store URL
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
Get magento JS URL
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
Posted in: magento