2

I am developing a custom theme which does not display the layered navigation filters, so I edited my catalog_category_view.xml adding the instruction:

<referenceBlock name="catalog.leftnav" remove="true" />

Removing the filters stops the layered navigation to work properly. If I visit the URL http://myurl.com/category-url-key?attribute_code=10 the site shows every product belonging to category-url-code, ignoring the filter attribute_code=10.

How do I make the layered navigation work without showing the layered navigation filters?

1 Answer 1

3

You can use 'display' instead. So use :

<referenceBlock name="catalog.leftnav" display="false" />

Reference :

Dev Docs XML

Display Explanation :

Allows you to disable rendering of specific block or container with all its children (both set directly and by reference). The block's/container's and its children' respective PHP objects are still generated and available for manipulation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.