carolineschnapp
12/8/2011 - 6:35 AM

Collection tags

Collection tags

<ul>

  <li{% unless current_tags %} class="active"{% endunless %}>
    {% if collection.handle %}
    <a href="/collections/{{ collection.handle }}">All</a>
    {% elsif collection.products.first.type == collection.title %}
    <a href="{{ collection.title | url_for_type }}">All</a>
    {% elsif collection.products.first.vendor == collection.title %}
    <a href="{{ collection.title | url_for_vendor }}">All</a>
    {% endif %}
  </li>
 
  {% for tag in collection.all_tags %}
    {% if current_tags contains tag %}
    <li class="active">
      {{ tag | link_to_remove_tag: tag }}
    </li>
    {% else %}
    <li>
      {{ tag | link_to_add_tag: tag }}
    </li>
    {% endif %}
  {% endfor %}
  
</ul>