質問

How to Add top link after "My Wishlist". The link should be visible on activating my custom module.I'm using Magento 1.9. I added the following

   <reference name="top.links"> 
      <action method="addLink" translate="label title" module="mymodule"> 
           <label>My Link</label> 
           <url helper="mymodule/quote/history/"/> 
           <title>My Link</title> 
           <prepare>true<prepare/> 
           <position>2</position> 
       </action> 
   </reference>
役に立ちましたか?

解決

You can do this by (This is my complete module's layout file):

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
     <reference name="top.links">
            <action method="addLink" translate="label title">
                <label>Custom Home Link</label>
                <url>home</url>
                <title>Custom Home Link</title>
                <prepare/>
                <urlParams/>
                <position>10</position>
            </action>
        </reference>
        </default>    
</layout>

他のヒント

Please add this local.xml or any other module xml over fronted layout folder.

 <default>
        <!-- Mage_Customer -->
        <reference name="top.links">
            <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></action>
        </reference>
    </default>

Also you can follow below links for the same.

URL : http://excellencemagentoblog.com/blog/2011/09/07/magento-add-top-links-in-magento/

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top