Just a little reference:

 Mage::getBaseDir(‘app’) => Get app directory path
 Mage::getBaseDir(‘media’) => Get media directory path
 Mage::getBaseDir(‘design’) => Get design directory path
 Mage::getBaseDir(‘code’) => Gives code directory file path
 Mage::getBaseDir(‘lib’) => Gives lib directory file path
 Mage::getBaseDir(‘skin’) => Gives skin directory file path
 Mage::getBaseDir(‘var’) => Gives var directory file path
 Mage::getBaseDir(‘cache’) => Gives cache directory file path
 Mage::getBaseDir(‘log’) => Gives log directory file path

Urls:

 Mage::getBaseUrl() => Get base url path e.g. http://yourwebsite.com/
 Mage::getBaseUrl('media') => Get MEDIA folder path e.g. http://yourwebsite.com/media/
 Mage::getBaseUrl('js') => Get JS folder path e.g. http://yourwebsite.com/js/
 Mage::getBaseUrl('skin') => Get SKIN folder path e.g. http://yourwebsite.com/skin/
 
 Mage::getUrl('',array('_secure'=>true))
 Mage::getUrl('module/controller/action',array('_secure'=>true))
 Mage::getUrl('module/controller/action')

 Mage::helper('core/url')->getHomeUrl();
 Mage::helper('core/url')->getCurrentUrl();

Static Blocks

{{base url=''}}
{{skin url='images/skinimage.jpg'}}
{{media url='/mediaimage.jpg'}}
{{store url=''}}
Advertisements