2014-09-19 67 views
1

默认的magento模板具有称为“登录”的顶部链接。 这是由标准模板customer.xml输出的。Magento - 更改现有链接的顶部链接标签(登录链接)

我做这在我的local.xml中,希望能删除当前链接“登录”和readding同一链接,但有不同的标签“登录/注册”

<action method="removeLinkByUrl"><url helper="customer/getLoginUrl" /></action> 
<action method="addLink" translate="label title" module="customer"><label>Log In/Register</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action> 

但是现在我有2个链接显示,一个叫做“登录”,另一个叫做“登录/注册”。

我该如何正确更改Magento中toplink的标签?

回答

0

试试这个删除

<default> 
     <reference name="top.links"> 
      <action method="removeLinkByUrl"> 
       <url helper="customer/getAccountUrl"/> 
      </action> 
     </reference> 
    </default> 

添加这个

<reference name="top.links"> 
     <action method="addLink" translate="label title"> 
      <label>Log In/Register</label> 
      <url helper="customer/getLogInUrl"/> 
      <prepare/> 
      <urlParams/> 
     </action> 
    </reference>