Magento Themes and Magento Extensions

Hiding (or Showing) Filters In Certain Categories

Share

Layered Navigation Plus and Layered Navigation Positioning extensions, you can easily hide or show individual filters in certain categories. Here is how:

  1. Open category in which you’d like to hide certain filter.
  2. Go to “Custom Design” tab.
  3. In “Custom Layout Update” field, add: 
    <reference name=”mana.catalog.above_products.nav“>
    <action method=”setHideCategory“><value>1</value></action>
    </reference>
  4. Instead of above_products.nav, you may use leftnav or rightnav (to specify in which layered navigation you intend to do the change).
  5. Instead of Hide, you may write Show (to force showing a filter in this category even if it is hidden in all the other categories).
  6. Instead of Category, you may write Color, Price, etc (take attribute code, like some_attribute_name and remove underscores and capitalize first letters, like SomeAttributeName). You can also write AllFilters to hide or show all filters.
  7. Save category.
  8. NOTE. Filter still won‘t show up if there is no products having that attribute.

Please note that by default Magento applies layout updates to subcategories. If you’d like NOT to hide filters in subcategories, please open each subcategory and set Custom Design -> Use Parent Category Settings to “No”. Please also note that in such cases, if you apply a category filter in parent category, then ”Custom Layout Update” field will still be used from parent category.

Comments are closed.