首页 > 其他 > 详细

magento给My Account等链接增加nofollow标签

时间:2014-01-28 18:14:04      阅读:446      评论:0      收藏:0      [点我收藏+]

Magento里面头部的My Account,Log In,My Wishlist几个链接都是通过xml布局文件进行调用的,为了SEO分配权重必须为它们加上”nofollow”标签,但它的链接并不是普通的HTML代码,所以想加nofollow标签就有点难度了。

找到模板下的customer.xml文件,默认位置是app/design/frontend/base/default/layout/customer.xml
打开编辑,例如要给”My Account”链接加“nofollow”属性, 搜索”My Account” ,完整代码如下:

bubuko.com,布布扣
<action method="addLink" translate="label title" module="customer">
<label>My Account</label>
<url helper="customer/getAccountUrl"/>
<title>My Account</title>
<prepare/>
<urlParams/>
<position>10</position>
<null/>
<aparams>rel="nofollow"</aparams>
</action>
bubuko.com,布布扣

别的照猫画虎就行了

magento给My Account等链接增加nofollow标签

原文:http://www.cnblogs.com/liuxgnu/p/3535395.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!