They’re clickable. But it breaks the images once you click ANYTHING. Also, for some reason two categories are selected by default despite not being enabled to do so. I only want the ‘All’ tag to be selected by default - which is how I’ve set it up. Yet…
That’s the link to the page I’m struggling with.
https:// www. creataves .com/graphic-design-illustration
Also, is there anyway to get the selection tags to work so that only one tag can be selected at a time?
This is how it looks in my edit window. (ALL is enabled and the rest isn’t.)
Hi Sharon,
There is a way to deal with this so only one selection tag can be selected at a time with a little JS code; something like this:
//initiate this variable at the top of the page
let tagValue = "";
export function selTags_change(event) {
let values = event.target.value;
// loop through the values array and find the previous one
for (var i = 0; i < values.length; i++) {
if (values[i] === tagValue){
// this is the previous one; remove it.
values.splice(i,1);
break;
}
}
// now, assign the "sliced" array that has only the latest
// selected tag in it.
$w("#stCollections").value = values;
// store currently selected tag in order to compare later
tagValue = values[0];
}
Hey! Thank! I’ve added the code and changed the #stCollections to my #tags so it looks like this:
//initiate this variable at the top of the page
let tagValue = "";
export function selTags_change(event) {
let values = event.target.value;
// loop through the values array and find the previous one
for (var i = 0; i < values.length; i++) {
if (values[i] === tagValue){
// this is the previous one; remove it.
values.splice(i,1);
break;
}
}
// now, assign the "sliced" array that has only the latest
// selected tag in it.
$w("#tags").value = values;
// store currently selected tag in order to compare later
tagValue = values[0];
}
But the problem persists where 3 tags are selected and any tag I click or unclick kills all the content in the gallery…
@sharon76690 Did you create a change event for #tags? This code has been tested and will work if applied correctly.
It’s not clear how you want the selection tag element to interact with the gallery. Can you explain? Do you have any code to share?