searchit
searchit copied to clipboard
Chaining Filters
Hi There,
Is it possible to chain the search string filters?
I have three filters:
{% for entry in craft.entries.section('entries').all() %}
{{ ({
filter: {
relatedTo: {
element: entry.id,
field: 'entries'
}
},
label: entry.title
})|json_encode() }}{{ not loop.last ? ',' }}
{% endfor %}
{% for category in craft.categories.group('categories').all() %}
{{ ({
filter: {
relatedTo: {
element: category.id,
field: 'categories'
}
},
label: category.title
})|json_encode() }}{{ not loop.last ? ',' }}
{% endfor %}
{ "filter":"term1", "label":"Term 1" },
{ "filter":"term2", "label":"Term 2" },
Independently, they all work great. However, I get errors when using the first two filters together. The first one does seem to work with the third one. I tried swapping out the category one for another search term filter. When applying all three, only the first two seem to work.
Is it possible?
Would be great to have the ability to chain filters
+1