I'm outputting all tags that are in use and then allowing the user to click these build up a query string to filter and display the results. It's all working fine.
Except, I'm having difficulty understanding what can I use to set an 'active' class on all the selected tags that are being added to the query string.
Setting 1 tag as active is simple enough, but when multiple are selected, I'm not so sure.
The URL looks like this: domain.com/learning/resources?tags=Video+Maths
Setting tags via getParam:
{% set tags = craft.request.getParam('tags') %}
Listing all tags in use like this:
{% set resourceTags = craft.entries.section('resources').limit(null) %}
{% for tag in craft.tags.relatedTo(resourceTags) %}
Outputting results like this:
{% craft.entries.section('resources').limit(craft.config.paginateLimit).search(tags) as entries %}`