How to Hide Category from Top Navigation but Show in Side Navigation

categoryfiltered-navnavigation

Is it possible to hide a child category from top navigation (selecting show in navigation as NO), but have it visible on side navigation in product listing pages?

Any extensions for this? Thanks.

Best Answer

If you are attempting this on ce-1.7 or later this can be done easily.

Here is how I would do it.
I would create a new category attribute (yes/no) called include_in_top_nav.
Then override the method Mage_Catalog_Model_Observer::_addCategoriesToMenu() and add this code

if (!$category->getIncludeInTopNav()) {
    continue;
}

right after

if (!$category->getIsActive()) {
    continue;
}

This way you have a general way of managing all the categories in the top menu.

Related Topic