Magento – category sidebar navigation

categorymagento-1.8navigation

I understand that category sidebar navigation display the categories you have created in Magento Admin Panel.

In my current scenario, i am facing one issue with categories. I am using the traditional way of creating menus.

For e.g. Home, Link1, Link2, Men –> All this are categories

Link1 ==> Its just normal navigation link like for example a contact us page.
Link2 ==> same as above
Link3 ==> Watch

In the extension that i used, it simply loop through all the categories that i have in my category folder.

My point here is that i want to display Men category only –> Since its contain all sub categories and items inside.

For e.g.

Men
–> Shirts
–> Pants

Currently, my sidebar navigation shows:

Link1
Link2

Men
–> Shirts
–> Pants

Best Answer

One way can be Set all other categories apart from Men to

Include in Navigation menu = No

Or You can also do via code customization:

You will need to modify the code:

<?php

    $catId              = 'Your Men Category Id';
    $category           = Mage::getModel('catalog/category')->load($catId);
    $childCategories    = $category->getChildrenCategories();
    foreach($childCategories as $_category){
        print_r($_category->getData());
    }

This will give you all sub-categories of Men category

Related Topic