您的位置:首页 > 其它

Url Function : 关于在magento中常常用到的调用url的方法

2010-01-10 20:00 183 查看
url的function:

$this->getBaseUrl()----return the base url of your store

相当于$this->getUrl('')一样

$this->getSkinUrl()----return the url of the folder containing your csss images and local js files(eg skin/frontend/default/your_theme, will vary depending on what package and theme the page is using)

$this->getJsUrl()-----returns the url of the main js folder. so if you want to include a new js library from a template you can use this.

这些参数的参数都是可有可无。如果参数是'index.xml'它会直接在已经得到的路径上加上这个字符串得到新的路径。

$this->getImageSrc()

$this->getImageAlt()

$this->getCopyright();

$this->getWelcome();

都是直接取得在后台configration/design里面已经有定义的了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: