Magento Forum

Adding Link to Customer Account Left Navigation
 
David Weingart
Jr. Member
 
Total Posts:  5
Joined:  2008-05-05
 

I’ve found a workaround for this issue, but I’m puzzled as to why my original approach isn’t working, since I think it should grin

I’m writing a custom module, let’s call it “Globex_Coolmod”, which is stored in app/code/local/Globex/Coolmod.

I want to add a link to a new page in the customer account section labeled “Manage Coolmods”. It should appear in the left navbar (under newsletter subscriptions, wishist, etc.)

What I Tried

I created a layout file: coolmod.xml with the following code:

<customer_account>
    <
reference name="customer_account_navigation">
        <
action method="addLink" translate="label" module="coolmod">
            <
name>coolmod</name><path>coolmod/dostuff</path><label>Cool Mod</label>
        </
action>
    </
reference>
</
customer_account>

This is an exact copy of the code that the Wishlist module uses to add its link to the sidebar in the customer account section.

Why doesn’t it work for a custom module? Really puzzled on this point.

What I did as a workaround was to override Mage_Customer_Block_Account_Navigation with my own block that calls the addLink method from code. Maybe that’s a better option? Not sure which is the “Magento Way”, but clearly my understanding of layouts and themes is lacking. grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
vmlive
Jr. Member
 
Total Posts:  1
Joined:  2008-10-22
 

Remove module="coolmod" from action row.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top