Advanced Content Manager Extension for Magento 1
For Magento 1
For Magento 2

Override default Magento menu with mine

This page explains you how to override the default Magento menu with another one using Advanced Content Manager for Magento 1.

If you have a Magento 2 store, you can use the extension Advanced Mega Menu Manager to simply add and custom any type of menus.

Once your menu is created, the first step is to add the block to your layout.

1. Layout

Edit or create the file app/design/frontend/your_package/your_template/layout/local.xml

Add these lines:

  <?xml version="1.0"?>
          <reference name="catalog.topnav">
              <block type="contentmanager/menu" name="main-menu" />

Based on Magento version 1.8 CE.

2. Edit the template file


If it does not exists copy it from base/default/template/page/html/topmenu.phtml to the above path. Then edit it.
For magento version lower than 1.8, the file is different: template/catalog/navigation/top.phtml


  <div class="nav-container">
      <ul id="nav">
          <?php echo $_menu ?>
  <div class="nav-container">
      <?php echo $this->getChildHtml("main-menu"); ?>

3. Make your menu using the same CSS than the default one.

ACM provide template file that can be modified, but you can also create dynamic template file corresponding to your menu.
Click here to learn more about menu template.

Copy file app/design/frontend/default/default/contenttype/menu.phtml to app/design/frontend/your_package/your_theme/contenttype/menu.phtml

This is your new file that will be called to display menu, but ACM also allow you to make a specific template for your specific menu.
Simply rename it from “menu.phtml” to “menu-main-menu.phtml” where “main-menu” match your menu identifier.

Edit it and add the id=”nav” to the <ul>, line 30.

Line 30

  <ul id="nav">
      <?php foreach($nodes as $node): ?>
          <?php echo $menu->render($node); ?>
      <?php endforeach; ?>