Change Category level when search

Hi, All.
Currently, I am using algolia module in Magento 2. I have a problem that all my categories are in a category. Therefore, when client going to search page the navigation bar only shows one category. How can I skip category level 0? Thanks

Currently navigation show

Category navigation
category 0

after click category 0
category 0
----category 1
----category 2

what I want

Category navigation
category 1
category 2

Hello @phamthehien291991,

the Algolia extension indexes the whole category tree in order to be able to power category pages as well.
If you want to skip the zero-level, you’ll need to hook your code to a custom event and change the indexed categories data - remove the zero-level.

Would that work for you?

1 Like