Filter gallery not filtering

Hello!

I’m trying to add a filter gallery and found a sitejet guide on how to set up the filters. Although I’m following all the steps, some of the filters just don’t want to work. Unsure if “ö” might be a problem in itself, but even when switching it out it still didn’t work.

Help would be greatly appreciated :cherry_blossom:

Bonus question: How do I get the filter buttons to be equally wide when set to two/four columns?

1 Like

Hi Therese

After several mails with the sitjet support I’m able to answer the question. I was really fighting with the same isue as you.

“ö” is a problem… should bve transcripted according to HTML URL Encoding Reference

Filter work if you filter one field according to the Field identifier in the collection manager (maybe different from the field name you have given). Looking in the collection managet is mandatory.

You can use multiple filter only on different fields.

Example:

A collection with a field “Grösse” gets automatically the field identifier “groesse” and The field “Bathrooms” gets the field identifier “bathrooms”

and the filter

#!filter[columns.groesse]=lte:750&order=columns.groesse_ASC

works.

Unfortunately a combined filter

#!filter[columns.groesse]=gte:751&filter[columns.groesse]=lte:1500&order=columns.groesse_ASC

doesnt work propery.

But the combined filter

#!filter[columns.groesse]=lte:750&filter[columns.bathrooms]=gt:1&order=columns.groesse_ASC

works because it’s filtering 2 different fields.

I’m preparing a feature request to improve this. Please support my request if its coming out.

You get the filter buttons equally wide either by giving them the same with property in percent or in rem or any other unit you would like to use. In the style you set the size on “auto”

Hi Armin!

Thank you for your answer.

So in the visible text box I write my word with ö, but in the filter setup I use what the URL encoding gives me instead?

As for the filtering I think what I’m asking about is something different? Here’s the link to the one I’m using, which is not linked to a collection but instead uses classes. Thank you though :blush:

https://help.sitejet.io/hc/en-us/articles/24275882852887-Add-an-image-gallery

1 Like

Hi Therese

Sorry, i as thinking you were talking about collections. They kept me busy fort a while.

In the button text you may write what you want. For any criteria you add a class to the pic. There you avoid “ö” and so on.

Example a filter calle Börse. No problem for thre button text.

The URL of thr button has to be “#boerse

Now you add in the style settings of the picture the relevant class. Or several classes.

The class of the pic has to start with “filter-” and the criteria in the URL, like “filter-boerse”

I’ve tried one, it’s working. With “ö” it doesn’t show any image.

like

I did do that, but for some reason some of them work and some do not :sweat_smile:

1 Like

In case I would suggest to check the spelling. It’s case sensitive. If you would like, please screenshot URL and the classes of the ones not working.

Hey Therese,

Maybe you like to post the filters and the setup plus a preview link? It could be just a minor thing, you know? Maybe 2 or 4 or 6 more eyes see more :slight_smile:

This is now officially making me feel insane lol as this is now also suddenly working :sweat_smile:

Two remaining issues tho:

  1. One of the filter buttons is highlighted as a default when it’s not supposed to be. Not filtering, just highlighted.
  2. The buttons are still not evenly distributed, setting a width just created weird white space.

*Just some placeholder images