Highlight active tag
From Shopify Wiki
[edit]
highlight_active_tag(tag)
This filter creates a span with the class active around the tag if it is active. Active means: the tag is currently used to narrow down the selection of shown products of a certain collection. A tag becomes active when someone used a link_to_tag or link_to_add_tag filter before.
{% for tag in collection.tags %}
{{ tag | highlight_active_tag | link_to_tag: tag }}
{% endfor %}
The above code creates a list of all tags of collection and wraps a <span class="active"> ... </span> around every tag that is currently active.
