It seems that I'm missing something elementary here, though I'm not able to spot it.

When trying to add a link to the customer dashboard (from a custom module) the link doesn't show up on the frontend.

Here is my layout update (warranty.xml, in the base/default/layout directory)

<?xml version="1.0"?>   
<layout version="0.1.0">
    <reference name="customer_account_navigation">
        <action method="addLink">

Some config details:

  • There is a custom theme being used (all of the layout changes are in a local.xml file)
  • Running Enterprise edition (though I don't think this should matter)

What I've tried:

  • Disabled Cache
  • Copied the warranty.xml to the current theme directory
  • Added the to the local.xml (this seemed to work, but want to do it the right way)

The XML file is being loaded (when xml not formatted correctly the system throws an error)

Update: Since I haven't been able to figure out what is wrong with the syntax (it seems fine to me), I went ahead and used an observer:

Event: core_block_abstract_to_html_before

public function addLink(Varien_Event_Observer $observer){
    $block = $observer->getBlock();
    if (!isset($block)) {
        return $this;
        if ($block->getType() == 'customer/account_navigation') {
            $block->addLink('custommod', 'custommod', 'Custom customer page');
  • did you ever fix this? – David Manners May 25 '14 at 17:05
  • @DavidManners no :( used an observer instead, its possible that there is a formatting issue when using phpstorm for making xml files, but couldn't confirm – pzirkind May 25 '14 at 17:57
  • shame, I copied over your code and it seemed fine for me, maybe you could share your observer solution incase someone else is having the same issue. – David Manners May 25 '14 at 17:58
  • @DavidManners i'm wondering if it has to do with some file format thing (UTF?) would you have any tips on how to test this out – pzirkind May 25 '14 at 23:56
  • I tested your layout update, and it works fine for me, so the syntax is correct (as i guess that your <layout> tag is actually closed). Do you have another warranty.xml file that could be located in the current design package (for example, rwd) ? – WilliamZ May 12 '15 at 9:25

Your problem might be, that your file is called before the customer.xml, the solution here is to <depends> on the Mage_Customer module, so your layout.xml is included later.

| improve this answer | |

Are you sure that your xml file is merged with other files? Can you paste config.xml of your module or check if for example adding <remove name="head" /> under <default> node of your warranty.xml brakes all layouts...

| improve this answer | |
  • @jermoon yes it is merged, when i add <remove name="head" /> it has the desired results – pzirkind Apr 1 '14 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.