Reputation: 658
I'm trying to make a clickable list of all collections on my collection page, but for some reason the following isn't working?
{% for collection in collections %}
{% collection.title %}
{% endfor %}
Upvotes: 0
Views: 3032
Reputation: 4096
You can output a variable with double curly braces, like this: {{ collection.title }}
This snippet would give you a list of collections with links:
<ul>
{% for collection in collections %}
<li>{{ collection.title | link_to: collection.url }}</li>
{% endfor %}
</ul>
You can learn more about Liquid syntax here: https://shopify.github.io/liquid/basics/introduction/
Upvotes: 1