I have a matrix field where the client can add as many rows as they like.
The rows get output to a 2 column layout:
<div class="col1">
<p>Matrix row 1</p>
<p>Matrix row 2</p>
</div>
<div class="col2">
<p>Matrix row 3</p>
<p>Matrix row 4</p>
</div>
So the template code would be:
{matrix_field}
<div class="col1">
<p>{matrix_data}</p>
{if row_count == (total_rows / 2)}
</div>
<div class="col2">
{/if}
{/matrix_field}
</div>
Of course {if row_count == (total_rows / 2)}
doesn't exist. How can this be achieved?