These are my categories :
Root category
---> Shoes
---- ---> Red shoes
---- ---> Green shoes
---- ---> Yellow shoes
---> Shirts
---- ---> Black shirts
---- ---> White shirts
---- ---> Blue shirts
and my top menu would be like:
-Shoes
-Shirts
But I only want to show my shoes in the top menu, Like this :
-Red shoes
-Green shoes
-Yellow shoes
How can I do that?
Best Answer
The categories are added in the top menu using this method
Mage_Catalog_Model_Observer::addCatalogToTopmenuItems
.buy default the method looks like this:
This means that it adds to the top menu the result of
Mage::helper('catalog/category')->getStoreCategories()
recursively.All you need to do is to rewrite this method and make it show only the child categories you need.
Something like this. Let's say that your
shoes
category id is 5.I haven't tested it, but I think the idea is there.