3

I need to move header links in header. For example I need that link "log in" to be first. How I can do this?

1 Answer 1

4

Magento 1 uses the block Mage_Page_Block_Template_Links in the default theme as the block that renders the links. To add links, use the following code in a layout.xml file:

<reference name="top.links">
    <action method="addLink">
        <label></label>
        <url></url>
        <prepare>false</prepare>
        <urlParams/>
        <position>1</position>
</reference>

To remove the a link, use <action method="removeLinkByUrl"><url>url/to/remove</url></action>.

In your case, remove the URL and then add it back with the position set to less than the position of the ones you want it rendered before.

Let me know if you have any questions!

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.