I have been asked to look after and do some work on this site:


It's mostly straightforward so far except:

  1. I cannot find where to edit the top navigation menu. The existing top menu pages are NOT listed in the 'Manage Categories' section of the admin panel, so I'm not sure where to change them in the
    navigation menu.

  2. I need to edit the Contact content page but it is not listed in the pages section.

I have searched google to no avail.

Please steer me in the correct direction.

Any help appreciated!

Thank you!

2 Answers 2


That topmenu doesn't appear to use Magento's renderer at first glance. It looks more like a static html template, probably located somewhere in app/design/frontend/yourpackage/yourtheme/template/page (wild guess) or somewhere similar.

Grep for unique identifiers (i.e. class/content) that might live in a template/block - you should find it pretty easily that way. Alternatively/additionally you can enable template path and block hints as outlined here

  • thanks, I used the 'Enable Template/Block Hints' to edit the contact page
    – Tim
    Commented Dec 9, 2014 at 1:13

The big fact is topmenu can be some other links except categories and I think that is what happens here. I am suspecting that, via a layout update or programmatically those menus are included in top menus.

Let us take the case of categories. Categories are included in menu programmatically. In Mage_Catalog module, you can see that, it is listening to an event page_block_html_topmenu_gethtml_before. This is a perfect event which will use by Magento to update topmenu items. Now if you look on the observer method and investigate further, then you will reach in this function at last.

protected function _addCategoriesToMenu($categories, $parentCategoryNode)
        foreach ($categories as $category) {
            if (!$category->getIsActive()) {

            $nodeId = 'category-node-' . $category->getId();

            $tree = $parentCategoryNode->getTree();
            $categoryData = array(
                'name' => $category->getName(),
                'id' => $nodeId,
                'url' => Mage::helper('catalog/category')->getCategoryUrl($category),
                'is_active' => $this->_isActiveMenuCategory($category)
            $categoryNode = new Varien_Data_Tree_Node($categoryData, 'id', $tree, $parentCategoryNode);

            if (Mage::helper('catalog/category_flat')->isEnabled()) {
                $subcategories = (array)$category->getChildrenNodes();
            } else {
                $subcategories = $category->getChildren();

            $this->_addCategoriesToMenu($subcategories, $categoryNode);

This function do mainly three things.

  1. It will first collect all category tree list and iterate through them and in each time create an array with necessary keys $categoryData

  2. Now it will set this array to an object which would be a new instance of Varien_Data_Tree_Node

  3. Then this object is just get added to the topmenu block using the method addChild()

So the key point that you need to understand is, the exact same thing is happening some other module in your system via a layout update or programmatically. Your job is to find exactly where this happens.

In order to find any layout update that is related to top.menu, you can perform a grep operation.

  grep -r top.menu

In order to find where topmenu updation happens programmatically

  grep -r page_block_html_topmenu_gethtml_before

Hope that would helpe you to resolve this issue.

  • thanks for your help! unfortunately I am not that much of an advanced user so I didn't really understand how to implement your solution.
    – Tim
    Commented Dec 9, 2014 at 1:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.