Cycles let you switch between alternate items on the list, i.e. the first item will be invoked the first time, the second item the second time and so on. If the list has three entries and the cycle is called for a fourth time, it will cycle through the list and invoke the first item again.

For example, you can cycle through each article in a solutions folder and alternate two styles between them.

{% for article in folder.articles %}  

<div class="{% cycle 'odd', 'even' %}">

{% endfor %}


Most of the time, cycle expressions are nested inside a looping structure. This way, for every iteration executed by the for-loop, the cycle will produce a different result. If there are two groups of values, like even and odd elements, they will alternate between each other like shown above.

Now that you have a fairly good idea about Liquid Theming, all you need now is a palette full of FreshThemes Placeholders before you start painting your own theme. 


Next: Dynamic Placeholders