2011-03-20
给My Account,Log In,My Wishlist链接增加nofollow属性
栏目:magento疑难解答
1,923 views
2 枚回复
大家都知道magento里面头部的My Account,Log In,My Wishlist几个链接都是通过xml布局文件进行调用的,为了SEO分配权重必须为它们加上”nofollow”属性,但它的链接标签并不是普通的标签,所以想加nofollow属性就有点难度了。下面是我的方法:
首先找到对应模板下的customer.xml 文件,默认位置是app/design/frontend/base/default/layout/customer.xml
打开编辑,例如要给”My Account”链接加”nofollow”属性, 搜索”My Account” ,然后把”
1 2 3 | <reference name="top.links"> <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare /><urlparams /><position>100</position><null /><aparams>rel="nofollow"</aparams></action> </reference> |
标签: 顶部链接加nofollow
转载注明:转自Topmagento.com|Magento技术交流站
本站遵循:署名-非商业性使用-禁止演绎 3.0 共享协议
收藏分享:
QQ书签 /
百度收藏 /
Google书签 /
收藏到鲜果 /
Digg /
Del.icio.us

我试了一下还是不行啊。。
[回复]
kivin 回复:
2011年09月5日 at 22:11
清除缓存试试,一定可以的
[回复]