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

How to create custom top.links.phtml template? 
 
Brig01
Jr. Member
 
Total Posts:  12
Joined:  2010-02-23
 

Hello

I’m wondering how I could create a custom top.links.phtml. I would need to add some additional code to it to style it up the way I want it but don’t want to edit the core file.

The top.links.phtml sets the My Account, My Cart, Checkout and Log In links at the top of the default layout.

I don’t need to change anything in the Toplinks.php file but I realise I might have to make a local version of this one as well as the phtml template is specified in this file and not in the xml.

I would just need a pointer to how to start. Do I need to create a custom module for this?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jwpadgett
Member
 
Total Posts:  69
Joined:  2007-09-05
 

You would just need to make a custom template and copy the file you want to override in it. Look at the designers guide in the wiki for an in-depth look at templating.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brig01
Jr. Member
 
Total Posts:  12
Joined:  2010-02-23
 

I guess I would have to create a local copy of the Toplinks.php file as well? In essence create a custom module.

I tried just creating a local copy of the phtml template and then reference this in the page.xml file but that doesn’t work.

Thanks

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