How can i edit this navigation bar? MAGENTO

How can i edit this navigation bar? MAGENTO

July 10, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How can i edit this navigation bar? MAGENTO

Editing Your Navigation Bar in Magento: A Comprehensive Guide

Hello everyone! I’m excited to help Jon and all our new developers out there tackle this common challenge of customizing the navigation bar in your Magento store.

Before we dive into solving Jon’s specific issues, let me provide a quick overview of where to find and work with your Magento navigation. The navigation is defined by XML files located in the app/design/frontend/<your_package>/<your_theme>/layout folder. Particularly, you’ll be working with the page.xml file for the main menu bar.

Changing the Size of Your Navigation Menu

To reduce the size of your navigation menu to 150px, you’ll need to modify the layout files where it’s defined. Open the app/design/frontend/<your_package>/<your_theme>/layout/page.xml file and locate this section:

<block type="page/html_toplinks" name="top.links" as="topLinks">
    <action method="setTemplate"><template>page/toplinks.phtml</template></action>
</block>

You can set the CSS style for the element using the style attribute. So, to change it to 150px width, you could add:

<block type="page/html_toplinks" name="top.links" as="topLinks">
    <action method="setTemplate"><template>page/toplinks.phtml</template></action>
    <action method="setStyle"><style>width: 150px;</style></action>
</block>

Remember to clear your Magento cache after making these changes.

Displaying the Navigation Bar on Every Page

By default, Magento’s top navigation bar is only shown on the homepage. To display it on all pages, you’ll need to modify the layout of each page where you want the menu to appear.

For example, if you want to show the navigation bar on the category view page (catalog_category_view.xml), add this block:

<block type="page/html_toplinks" name="top.links" as="topLinks" template="page/toplinks.phtml"/>

You can find more information about modifying layout XML files and adding blocks in the official Magento documentation: Layout Files.

Changing Menu Item Colors on Hover

To change the color of menu items when hovering, you’ll need to modify the CSS. Open your theme’s main CSS file (usually skin/frontend/<your_package>/<your_theme>/css/styles.css) and locate the .top.links selector:

.top_links {
    /* Your current styles */
}

You can add hover styles for the menu items using the :hover pseudo-class. For example, to change the text color to red on hover:

.top_links li a:hover {
    color: #ff0000;
}

Remember that CSS changes require clearing your Magento cache and browser cache.

Conclusion

Customizing your navigation bar in Magento requires working with XML layout files and CSS styles. By modifying the page.xml file for the main menu bar and using the appropriate actions to set styles, you can easily change the size of your navigation.

To display the navigation on every page, you’ll need to add the necessary blocks to each page’s layout XML file—catalog_category_view.xml, catalog_product_view.xml, etc. The official Magento documentation provides a comprehensive guide to working with layout files and blocks.

For more advanced customizations and a detailed walkthrough of editing your theme, consider checking out our Magento Theme Development Guide for in-depth tutorials and best practices from the expert developers at Laravel Company.

Cache Themes Errors

Our network