title: Filter products through tags in Shopify
body: <p>I am trying to pull only the products from a collection that have a certain tag. This is my way of creating sub-collections since Shopify doesn't do this.  My code doesn't seem to be working, and I can't figure out why it isn't working. I am doing this on the collection.liquid page. It is just printing the headings to the screen, but not the list of products. Any ideas?</p>
  
  <pre><code>{% if collection.handle == "all" %}
    &lt;!-- All Collections --&gt;
      &lt;div id="collections"&gt;
        &lt;h2&gt;Brave Bracelets&lt;/h2&gt;
        &lt;div class="product-list clearfix"&gt;
          &lt;h3&gt;Cerulean&lt;/h3&gt;
          &lt;ul&gt;
            {% for product in collections.brave-bracelets.products %}
              {% capture alt_attr %}{{ product.title }} by The Brave Collection{% endcapture %}
              {% if product.tags contains "cerulean" %}
                &lt;li&gt;
                  &lt;a href="{{ product.url }}"&gt;&lt;img src="{{ product.featured_image | product_img_url: 'compact' }}" alt="{{ alt_attr }}" /&gt;&lt;/a&gt;
                  &lt;h3&gt;&lt;a href="{{ product.url }}"&gt;{{ product.title }}&lt;/a&gt;&lt;/h3&gt;
                &lt;/li&gt;
              {% endif %}
            {% endfor %}
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;&lt;!-- #collections --&gt;
  {% endif %}
  </code></pre>