Well, I watched a YouTube with instructions on how to do it. I’ve read a post here about how to do it. And I still can’t get it to work.
I want a clickable tag cloud on a repeater page that already has a filter and a dropdown.
Here is the page: https://debbie469.wixsite.com/website-2/copy-of-taking-new-clients (at this time, until I finish designing it)
I want it to act like this: https://eyalcwix.wixsite.com/selectiontags-filter/inclusive
I want the user to click on the service and have individuals show who have that service in their tags. I want it to include all who have either tag if the user selects more than one.
Here is my code:
import wixData from ‘wix-data’ ;
function createFilterThatMatchesAnyKeyword(selectedKeywords) {
return (selectedKeywords && selectedKeywords.length > 0 ) ?
// Filter content that fits any of the selected keywords.
wixData.filter().hasSome( ‘keywords’ , selectedKeywords) :
// When no keywords are selected, do not filter any content.
wixData.filter();
}
export function keywords_change(event) {
let selectedKeywords = event.target.value;
let filter = createFilterThatMatchesAnyKeyword(selectedKeywords);
$w( ‘#teamRepeater’ ).setFilter(filter);
}
There’s a red dot on the second to bottom line that says "set filter does not exist on ‘#teamRepeater’
I tried putting in Team for the name of the dataset. I tried putting in the field key: services1.
Some notes:
The preset filter is of a text field to only show on this page if that field has “Accepting New Clients.”
Dataset Name: Team
Tags Field Key: services1
Repeater ID: teamRepeater
This is not a dynamic page.
The dropdown is filtering based on entries in a field I don’t have showing in the repeater.
I tried having some text that has the tags in the repeater and tried it without having the text of the tags in the repeater (and I connected the text to that tag field in the dataset).
Forgive my ignorance. I’m more of a designer than a coder.
Help please.