Magento – How to disable filter “category” from Sidebar

categoryfilterlayout

I choose my Category XY and get the Product-Grid, on the left side there is the Sub-navigation and below the "Filter Navigation".

The attribute filters starts with "categories", "manufacturer", "size", ..

How can I disable/remove the filter "categories" from sidebar?

I tried per CSS with

#narrow-by-list dt:first-child {display:none;}

but I cannot remove the categories itself. In which XML I have to remove some blocks? I have no idea .. Thanks for your help.

Best Answer

In your theme catalog.xml file replace the following line

<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml" />

with

<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml">
    <action method="unsetChild"><child>category_filter</child></action>
</block>

If you're curious why it works, see Mage_Catalog_Block_Layer_View::_prepareLayout()

Related Topic