1

I followed these two guides: one, two but I can't add my link at the end of the others, and maybe it's because there's an extension that put their own.

I don't know how Magento construct the layout if it has an order or something.

In customer.xml after the Magento default links, I tried to add mine but after the extension ones (with after="extensionLinkName"). And it doesn't work. Any idea?

1 Answer 1

0

The local.xml file is loaded last when rendering layout xml, so that would likely be the best place, if you want your links to be at the end. There is an SE question HERE with a great deal more information on the order that Magento constructs its layout.

As for an immediate solution, you'll want to place the following at the end of your app/design/frontend/PACKAGE/THEME/layout/local.xml file:

<customer_account>
    <reference name="left">
        <action method="addLink" translate="label">
            <name>some_link_name</name>
            <path>the/path/wanted/</path>
            <label>Link Label</label>
        </action>
    </reference>
</customer_account>

If for some reason (likely explained in the referenced link) your extension is being loaded after the local.xml file, then you'll have to copy the appropriate layout file to your fallback theme and insert the addLink action in the appropriate spot.

1
  • Thanks, It's work perfectly, I did not know that the layout load follow an order
    – oootramas
    Commented Nov 13, 2017 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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