Categories
-
Recent Comments
Community News
- How To Set Up Files For Printing: A Comprehensive Guide
- Watch Tampa Bay Rays Vs Boston Red Sox Live Streaming Online Tv Espn
- Beauty of Interior and Exterior Designs
- Working with Cookies using jQuery and pure JavaScript
- 5 Advanced CSS Pseudo Classes that will Save your Day
- 8 Design Elements Your Blog Should Have
- 80 creative examples of logos featuring animals
- 50+ Free High Quality Gothic & Horror Fonts Cat: Typography
- Two “Access All Areas” Blog.SpoonGraphics Subscriptions Up For Grabs!
- Create a Fun Print-Ready Doodled Business Card Design
-
RSS Links



Shopify Categories Within Collections
How to use Liquid to create product navigation in Shopify
<ul class="collections"> {% for collection in collections %}
{% if collection.handle != 'frontpage' %}
<li><h3><a href="{{ collection.url }}" title="{{ collection.title }}">{{ collection.title }}</a></h3>
<ul class="tags"> {% for tag in collection.all_tags %}
<li><a href="{{ collection.url }}/{{ tag | handleize }}" title="{{ tag | escape }}">{{ tag }}</a></li>
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
The above code will create a product navigation of all your collections and all the tags within the appropriate collection. The third line of code is use to exclude collection such as the frontpage collection which isn’t really appropriate in your product navigation.
Related posts: