Shopify Filter with Multiple Tags at Once, in Two Groups
<p>I have multiple products organized with tags and the tags repeat across multiple products. The organization is set up like this:</p>

<p>Home Products</p>

<p>-tag1</p>

<p>-tag2</p>

<p>-tag3</p>

<p>Outdoor Products</p>

<p>-tag4</p>

<p>-tag5</p>

<p>-tag6</p>

<p>And the Liquid, like this:</p>

<pre><code>&lt;div class="home-products"&gt;
{% for tag in collection.all_tags %}
    {% assign tag_handle = tag | handle %}
    {% if tag_handle contains 'tag1' or tag_handle contains 'tag2' or tag_handle contains 'tag3' %}
        {% if current_tags contains tag %}
            &lt;div class="tag--active"&gt;
                {% if tag_handle contains 'tag1' %}               
                    {{ tag | link_to_remove_tag: tag }}     
                {% elsif tag_handle contains 'tag2' %}                
                    {{ tag | link_to_remove_tag: tag }}     
                {% elsif tag_handle contains 'tag3' %}                
                    {{ tag | link_to_remove_tag: tag }} 
                {% endif %}             
            &lt;/div&gt;
            {% else %}
            &lt;div&gt;
                {% comment %}
                    Use link_to_add_tag if you want to allow filtering
                    by multiple tags
                {% endcomment %}
                {% if tag_handle contains 'tag1' %}               
                    {{ tag | link_to_add_tag: tag }}    
                {% elsif tag_handle contains 'tag2' %}                
                    {{ tag | link_to_add_tag: tag }}    
                {% elsif tag_handle contains 'tag3' %}                
                    {{ tag | link_to_add_tag: tag }} 
                {% endif %} 
            &lt;/div&gt;
        {% endif %}
    {% endif %}
{% endfor %}
&lt;/div&gt;

&lt;div class="personal-care-products"&gt;
{% for tag in collection.all_tags %}
    {% assign tag_handle = tag | handle %}
    {% if tag_handle contains 'tag4' or tag_handle contains 'tag5' or tag_handle contains 'tag6' %}
        {% if current_tags contains tag %}
            &lt;div class="tag--active"&gt;
                {% if tag_handle contains 'tag4' %}               
                    {{ tag | link_to_remove_tag: tag }}     
                {% elsif tag_handle contains 'tag5' %}                
                    {{ tag | link_to_remove_tag: tag }}     
                {% elsif tag_handle contains 'tag6' %}                
                    {{ tag | link_to_remove_tag: tag }} 
                {% endif %}             
            &lt;/div&gt;
            {% else %}
            &lt;div&gt;
                {% comment %}
                    Use link_to_add_tag if you want to allow filtering
                    by multiple tags
                {% endcomment %}
                {% if tag_handle contains 'tag4' %}               
                    {{ tag | link_to_add_tag: tag }}    
                {% elsif tag_handle contains 'tag5' %}                
                    {{ tag | link_to_add_tag: tag }}    
                {% elsif tag_handle contains 'tag6' %}                
                    {{ tag | link_to_add_tag: tag }} 
                {% endif %} 
            &lt;/div&gt;
        {% endif %}
    {% endif %}
{% endfor %}
&lt;/div&gt; 
</code></pre>

<p>My problem is that I want it to "reset" each time you switch between categories.  Currently, if you click on a couple from on section, then one from the next, you get</p>

<p>collections/all/tag1+tag2+tag5</p>

<p>when it should be</p>

<p>collections/all/tag5</p>

<p>Thoughts?  Thanks in advance</p>