PHTML文件中调用相关地址:
//获取 magento js 路径
STATIC Block中调用相关地址:
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))
//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’}}
相关文章
订阅评论
登录
请登录后发表评论
0 评论
最旧