magento获取域名及相关路径

PHTML文件中调用相关地址:

magento获取域名及相关路径
//获取 magento js  路径
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
//http://你网站地址/index.php/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
//获取 magento media 目录
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);    
//magento中 获取skin目录
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
//http://你网站地址/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
//获取当前页面URL地址
$currentUrl = $this->helper(‘core/url‘)->getCurrentUrl();
//首页地址
$home_url = Mage::helper(‘core/url’)->getHomeUrl();
//安全的Skin URL
$this->getSkinUrl(‘images/image.gif’, array(‘_secure’=>true))
magento获取域名及相关路径

STATIC Block中调用相关地址:

magento获取域名及相关路径
//Skin URL
  {{skin url=’images/image.jpg ‘}}
//Media URL
  {{media url=’/image.jpg’}}
//Store URL
  {{store url=’mypage.html’}}
//Base URL
  {{base url=’mystore/mypage.html’}}
magento获取域名及相关路径

magento获取域名及相关路径

上一篇:异常处理之“The remote certificate is invalid according to the validation praocedure.”


下一篇:linux下top命令详解