Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

Single-select tag and tag in another language

1 month 2 days ago #1

  • Gianluca's Avatar
  • Gianluca
  • Posts: 49
  • Now you can click multiple tags filters at the same time. By modifying the code it is possible to have a single selection or if I click on a tag if there is one already selected it will automatically deselect?
  • Another question how can I make sure that the tags I insert are translated into another language?
    For example: I have a site in Italian and English, I would like the tags filters to be translated when switching from one language to another

1 month 3 days ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 15466
Hello,
Thank you for contacting us

Your question is not entirely clear.
Describe in more detail.

Best Regards,
Vyacheslav, Balbooa Support Team

1 month 3 days ago #3

  • Gianluca's Avatar
  • Gianluca
  • Posts: 49
Hi,
for the first question:
attach 2 gif animate

• how the multi-activation filter works now:



• below the gif of how I'd like it to work with multiple selection off:

Attachments:

1 month 3 days ago #4

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 15466
GIF files don't work.
Send them to us via the contact form.

support.balbooa.com/contact-us

Regards,
Vyacheslav, Balbooa.com

1 month 3 days ago #5

  • Gianluca's Avatar
  • Gianluca
  • Posts: 49
I edited the post above now they go

1 month 3 days ago #6

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 15466
You need use this code:
document.addEventListener('DOMContentLoaded', function(){
    jQuery('.gallery-tag').on('mousedown', function(){
        jQuery('.gallery-tag.active').not(this).trigger('click');
    });
})

Regards,
Vyacheslav, Balbooa.com

1 month 3 days ago #7

  • Gianluca's Avatar
  • Gianluca
  • Posts: 49
Perfect is how I wanted it. Thank you.
Regards

1 month 3 days ago #8

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 15466
You are welcome ;)
Let us know if you need more assistance!

Best Regards,
Vyacheslav, Balbooa Support Team

1 month 3 days ago #9

  • Gianluca's Avatar
  • Gianluca
  • Posts: 49
Sorry if I still bother you: what is the script to have the tags in alphabetical order?
Regards
Gianluca

1 month 2 days ago #10

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 15466
Hello,
Thank you for contacting us

You need use this code :
document.addEventListener('DOMContentLoaded', function(){
    var tags = Array.apply(null, document.querySelectorAll('.gallery-tag'));
    tags.sort(function(tag1, tag2){
        if (tag1.textContent.toLowerCase() > tag2.textContent.toLowerCase()) {
            return 1;
        } else if (tag1.textContent.toLowerCase() < tag2.textContent.toLowerCase()) {
            return -1;
        }

        return 0;
    });
    tags.forEach(function(tag){
        tag.parentNode.append(tag)
    });
});

Best Regards,
Vyacheslav, Balbooa Support Team

1 month 2 days ago #11

  • Gianluca's Avatar
  • Gianluca
  • Posts: 49
Thank you very much Vyacheslav.
Regards
Gianluca

1 month 2 days ago #12

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 15466
You are welcome ;)
Let us know if you need more assistance!

Best Regards,
Vyacheslav, Balbooa Support Team
Powered by Kunena Forum