class Liquid::For

Overview

"For" iterates over an array or collection. Several useful variables are available to you within the loop.

== Basic usage: {% for item in collection %} {{ forloop.index }}: {{ item.name }} {% endfor %}

== Advanced usage: {% for item in collection %} <div {% if forloop.first %}class="first"{% endif %}> Item {{ forloop.index }}: {{ item.name }}