Question

I have some custom module, on activating this module I want to show a "Custom Module Link" as a top link. Please refer the snapshot below.

How can I achieve this? This link should redirect to one of the Customer account navigation link.

toplink

Was it helpful?

Solution

Try this

<default>
    <reference name="top.links">
        <action method="addLink" translate="label title"><label>Custom</label><url>YOUR_URL_KEY</url><title>Custom</title><prepare/><urlParams/><position>10</position></action>
     </reference>
</default>

OTHER TIPS

Top-links are generaly managed in Magento through layout.xml files. To add a link to top links, you need to add an xml code to layout files.

Please refere to this http://excellencemagentoblog.com/blog/2011/09/07/magento-add-top-links-in-magento/

EDIT:

Please put this code under <reference name="top.links"> and before closing tag </reference> in your local.xml

<action method="addLink" translate="label title">
    <label>Your label module</label>
    <url>your custom url</url>
    <title>Your title module</title>
    <prepare>true</prepare>
    <position>2</position>
</action>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top