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>

    别的照猫画虎就行了

  • 相关阅读:
    python
    python
    python
    python
    python
    python
    python
    python
    [ThinkPHP] 从一个表中获得栏目对应的ID,从另一个表获得属于这些栏目的文章
    [thinkPHP] buildSql可以查看tp CURD操作对应的SQL
  • 原文地址:https://www.cnblogs.com/liuxgnu/p/3535395.html
Copyright © 2011-2022 走看看