I have a html structure where two entries are grouped into one div, so what I do is this:
{exp:channel:entries channel="bullets" dynamic="no"}
{switch='<div class="bullets">|'}
<div class="col-lg-6 col-sm-6">
...some content...
</div>
{switch='|</div>'}
{/exp:channel:entries}
This works great as long as I have an even number of entries in the channel. If I have an odd number the closing is not being added.
I was wondering if I can somehow do something like this:
{if total_results mod 2 != 0}
</div>
{/if}
to make sure I have a closing tag if I have an odd number of entries.
Any suggestions?