How can I duplicate Magento top.links into header and footer

How can I duplicate Magento top.links into header and footer

September 25, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How can I duplicate Magento top.links into header and footer

Duplicating Magento Top Links into Header and Footer: A Comprehensive Guide

Introduction

Magento theme customization can be challenging for beginners due to its complex structure. In this post, we'll guide you through the process of duplicating your top.links menu to appear in both the header and footer sections of your store.

Understanding the Problem

Many developers face an issue where adding a block to the footer causes it to disappear from the header. This occurs because Magento blocks are loaded only once, and their content is reused throughout the template.

Solving the Issue: Duplicating Top Links

To solve this problem, you need to create a copy of your top.links block for the footer while keeping the original one in the header. Here’s how to do it:

Step 1: Create a Copy of the Original Block

In your page.xml file (usually located in app/design/frontend/<your_package>/<your_theme>/layout), add the following block definition for the footer:

<block type="page/template_links" name="footer.links" as="footerLinks"/>

Notice that we’ve renamed the block to “footer.links”. This creates a duplicate of your original top.links.

Step 2: Reference the Copied Block in Your Footer

In your footer.phtml file, reference this new block:

<?php echo $this->getChildHtml('footerLinks') ?>

This will display the duplicated top.links menu in your footer.

Step 3: Ensure the Original Menu Appears in the Header

To ensure your original top.links appears in the header, check that your page.xml file has this block definition:

<block type="page/template_links" name="top.links" as="topLinks"/>

This is usually the case by default.

Conclusion: Best Practices and Further Reading

Duplicating blocks in Magento is a common technique for theme customization. Remember to follow these best practices:

  1. Always create backup copies of your files before making changes.
  2. Use child themes to avoid overwriting core files.
  3. Be cautious when modifying layout XML and PHP templates.

For more advanced theme development techniques, consider reading our comprehensive guide on Magento Theme Development at Laravel Company.

Contact Us for Professional Magento Support

If you’re facing other issues or need professional assistance with your Magento store, don’t hesitate to contact us. Our team of experienced developers can help you solve complex problems and optimize your e-commerce platform. Visit our Magento Services page for more information.

Stay tuned for more Magento tips and tricks!

Themes Errors

Our network