Total Posts: 653
Buenos Aires, Argentina
All the links you see in the top links block are created in the layout xmls. They are distributed in the diifferent xmls corresponding to where the link is referring to.
There are two ways to call a link, you can use one only for cases where magento uses it like that, and the other one for any link you want to insert.
For example, you need to locate the “My Cart” link, then look for it in checkount.xml:
You should see something that says <reference name="top.links"> inside you will see the first way to add links, it uses a method called “addCartLink”, obviously that is specific for the cart link and cannot be changed, but you can either change the reference or duplicate it and change it also so you can have it in two blocks.
For the second (and more common) way of adding links, you can go to customer.xml.
Here look for the same reference, and inside you will find a method called “addLink”, there you can set the label, title, url and position within the other links in the same block.
If you copy that code you can also add your own links.
Hope that helps!