Link to remove tag

From Shopify Wiki

Jump to: navigation, search

link_to_add_tag(tag)

This filter creates a link to all products in a collection that have the given tag and all the previous tags that might have been added already.

{% for tag in collection.tags %}
   {{ '+' | link_to_add_tag: tag }} {{ tag }}
{% endfor %}

The above code creates a list of links for each tag of each product in the collection. In this case, the '+' is the clickable link name with a following tagname. Using this filter, you specify the search by using more than just one tag. This way you can add lets say the tags "green", "summer sale" and "cheap" within the a collection called "clothing" and it would show you only products that are in this collection that also have all of the added tags.

Personal tools