An Operation Tag allows for basic logic with Flex. For example, looping through categories.
Example:
{% define $x = 1 %} {% loop category(cat_featured_products, 'name', 'asc') %} {% if $x == 1 %} <tr> {% endif %} <td> <a href="{cat_featured_products.url}">{cat_featured_products.name}</a> </td> {% if $x == 2 %} </tr> {% define $x = 1 %} {% else %} {% increment($x) %} {% endif %} {% endloop cat_featured_products %}
Output:
<tr> <td><a href="/clothing/mens">Mens</a></td> <td><a href="/clothing/womens">Womens</a></td> </tr> <tr> <td><a href="/clothing/hats">Hats</a></td> <td><a href="/clothing/accessories">Accessories</a></td> </tr>
From the example above, you can see we are all Operation Tags are enclosed by {% %}