9

I need to edit the Magento Top Links in a specific way and only need to show three links in below order

Login  Register  Cart

This would result in following

  1. Remove only Checkout Link and not Cart Link
  2. Remove My account Link and add Register Link instead
  3. Rename My Cart to Cart

How can I achieve this ?

Please Guide.

Thanks !!!

1
  • How can I do it using top.links.phtml ?
    – Mark
    Apr 10, 2014 at 5:16

3 Answers 3

11

You can also remove some of the top links in your local.xml by referencing them and removing them by name.

<reference name="top.links">
   <remove name="wishlist_link"/>
   <remove name="checkout_cart_link"/>
</reference>

This only work if the top link was created with a name like this:

<reference name="top.links">
   <block type="wishlist/links" name="wishlist_link" />
   <action method="addLinkBlock"><blockName>wishlist_link</blockName></action>
</reference>

For the log in and log out, since they aren't called with a "name", you can't remove it this way.

6

you can modify it by edit reference name="top.links" block in following .xml files

 1. app/design/frontend/Your_theme/default/layout/checkout.xml 
 2. app/design/frontend/Your_theme/default/layout/customer.xml

Check this following post

How to edit header links?

You can get more idea from here

2
  • yeah. Its my answer! Its only suggestion for you!
    – DRAJI
    Apr 10, 2014 at 6:00
  • 2
    Mark, this is not constructive. What did you do? What is the problem? What did you expect to happen. And please edit the question to add more information and DON'T write a unreadable comment. Thanks! Apr 10, 2014 at 6:04
5

You can use

   <!-- Removes 'Log Out' link-->

   <reference name="top.links">
      <action method="removeLinkByUrl">
         <url helper="customer/getLogoutUrl"/>
      </action>
   </reference>

Reference: http://sarathlal.com/remove-top-links-in-magento/

Your Answer

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

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