Here is the site I am working on:
https://syncds.wixsite.com/eddale
My issue is with “FEATURE COMMUNITIES”. I’d like to be able to link each image to a filtered search for that community. It works when going through the search bar, but an easy way to link to a filtered search is beyond me.
Any help would be appreciated.
Hi,
You read the query parameters from the previous page, which resolves to :
{"dsOrigin":"Editor1.4","editorSessionId":"48d2c622-229e-43b5-bcef-5db3df8c0f60","esi":"48d2c622-229e-43b5-bcef-5db3df8c0f60","isEdited":"true","isSantaEditor":"true","lang":"en","metaSiteId":"bf7d4821-f9ca-4548-8eb6-edeaec88c832","neighbourhood":"RoyalWood","range":"$400,000 - $599,999"}
Then, you try to compare unrelated fields in your setFilter call:
$w("#dataset1").setFilter(wixData.filter().contains('neighbourhood',area).contains('priceRange',pRange).contains('allFeatures',lastFeature).ne('sold', true));
For example, pRange equals to a text string (“$400,000 - $599,999”), while the actual range field in your collection is also a text string (“Under $200,000”)
Trying to compare the two strings using .contains makes no sense.
You should think of another way of storing this information in a searchable way.
for example by adding two fields, one for min price and one for max price, both numbers.
This way you will have the option to query a number and specify that it needs to be less than the max price and greater than the min price.
Okay, I get that. Thank you for the advice.
Where my worry comes in is with the Communities section though.