You can iterate through HTML or liquid code by using the For loop. Loops are especially useful for things like running through and displaying all the solutions under a specific folder.



{% for item in array %}{% endfor %}

You can also limit the number of iterations by using the limit parameter. 

{% for folder in category.folders limit: 6 %}

{% endfor %}

There are times when you want to start looping from the second, fifth or the n’th item in your list. You can do this using the offset parameter.

{% for forum in portal.forums offset: 2 %}

{% endfor %}

Next: Assigning Variables