I’ve created a category filter, and now I’d like to add a subcategory filter based on the selection that was made for the category filter.
So if we go back to the car rental example. Let’s say you have selected Volkswagen as the Brand. Then I want a filter to show up in which you can choose from the various Volkswagen types. And if you select Audi, then you would see the type filter: A3, A2, A4 etc. (so seeing the type filter, depending on the brand filter you’ve selected.)
Does anyone know if this is possible and how I should create this? FYI I’ve created a CMS for Categories with a multi-reference field for Subcategories.
I actually spent several months trying to figure out a way but with no luck. the only thing that worked is after selecting the brand i could get the models related; but could not make the year or generation appear based on the selected model.
There are some mechanical challenges here, such as populating your Selects with CMS data. But that aside the main problem is that CMS Filter is designed to work on a single collection list only.
In your scenario, you have two on the same page- your main results list, and your second select within the filter.
In situations like this, I’d use CMS Filter for the main list only, and the build a separate mechanism for handling the dynamics between select 1 ( e.g. car brand ) and select 2 ( e.g. car type ).
That’s not difficult, but it definitely requires a bit of custom code.
In certain cases, it is possible to creatively use two
Just realised I am genuinely looking for the same solution after making my own post!
What I need is pretty much identical to what you asked regarding the Car Rental Example…
My clients want it that when the ‘Brand’ is selected, the ‘Model’ dropdown will only showing filtered options - based on the ‘Brand’ previously selected.
My ‘Brand’ and ‘Model’ lists are populated using CMS Select and all work fine together.
I just cannot work out how to filter the ‘Model’ list that appears…
Did anyone in this thread find a solution to achieve this?
Is it is custom code… I am a bit of a noob with that, so I may need some guidance sorry!