zoukankan      html  css  js  c++  java
  • magento给My Account等链接增加nofollow标签

    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” ,完整代码如下:

    <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>

    别的照猫画虎就行了

  • 相关阅读:
    CodeForces
    codeforces 1250B The Feast and the Bus
    CF1038D Slime
    CodeForces-208C Police Station
    差分约束
    HDU 2586
    HDU 3948
    HDU 2222
    作业
    闰年的判断
  • 原文地址:https://www.cnblogs.com/liuxgnu/p/3535395.html
Copyright © 2011-2022 走看看