Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

My Account Link in Footer
 
mister
Member
 
Total Posts:  42
Joined:  2008-08-31
 

I would like to add links into my footer for ‘My Account’ and ‘My Wishlist’ and so on.  I know I could statically create the links in the footer, but my PHP background tells me that this would be a bad idea.

I tried to locate the top links to see how Magento created the links, but that was a dead end search once I found the top.links.phtml file.

Can someone tell me what I should do to create some links in my footer, statically create links, or is there a better way to create links with Magento?

One last note worth mentioning, I am using .phtml files for my footer, so I will need to be able to create the links in the .phtml files, I am assuming?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mister
Member
 
Total Posts:  42
Joined:  2008-08-31
 

If anyone is curious, I have found some information.
The ‘My Account’ link is being generated in ‘customer.xml’, line 53, give or take.

I was able to copy and paste this line into my ‘page.xml’ file for my footer section.  Is that the proper way of doing this?

Also, I am now searching for the ‘My Cart’ link.  Anyone have any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brandlive_br
Guru
 
Avatar
Total Posts:  653
Joined:  2008-05-19
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!

 
Magento Community Magento Community
Magento Community
Magento Community
 
brandonmcpeak
Jr. Member
 
Total Posts:  2
Joined:  2014-02-03
 

I have the same question, and this appears to be the answer I’m looking for, but I cannot figure out for the life of me where in page.xml the XML for the links needs to go. Any help with this would be greatly appreciated!

 
Magento Community Magento Community
Magento Community
Magento Community
 
christinavick
Guru
 
Total Posts:  355
Joined:  2013-11-13
 

Hello,

You can have a look this thread for help http://tomrobertshaw.net/2010/06/how-to-change-the-footer-links-in-magento/

Hope this will help you!!

Thanks

iLoveMage

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top