2014-09-19 78 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>