Created
December 14, 2016 07:58
-
-
Save joe-dempsey/945e76cd1bd630b8c2783408dd3ba7bf to your computer and use it in GitHub Desktop.
loop through shopify tags to see if a product has a tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %}this tag loop looks for tag border in the product tags - if it finds it then it adds a class="border_this"{% endcomment %} | |
{% comment %} break is used to escape the loop - more efficient code {% endcomment %} | |
{% for tag in product.tags %} | |
{% if tag contains 'border' %} | |
class="border_this" | |
{% break %} | |
{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you, this really helped!