So I've removed the tag 'Women' from the filter selector, what do i add to the code to block multiple tags?
{% for tag in collection.all_tags %}
{% unless tag contains 'Women' %}
<option value="/collections/{% if collection.handle != blank %}{{ collection.handle }}{% else %}all{% endif %}/{{ tag | handleize }}"{% if current_tags contains tag %} selected="selected"{% endif %}>{{ tag }}</option>
{% endunless %}
Solved! Go to the solution
Success.
You can use "or" operator in "unless" condition. like following code:
{% for tag in collection.all_tags %} {% unless tag contains 'Women' or tag contains 'Men' or tag contains 'XYZ' %} <option value="/collections/{% if collection.handle != blank %}{{ collection.handle }}{% else %}all{% endif %}/{{ tag | handleize }}"{% if current_tags contains tag %} selected="selected"{% endif %}>{{ tag }}</option> {% endunless %} {% endfor %}
Cheers,
Tejas
Subject | Author | Posted |
---|---|---|
17m ago | ||
21m ago | ||
36m ago | ||
44m ago | ||
44m ago |
User | Count |
---|---|
95 | |
63 | |
61 | |
56 | |
41 |