I'm building a grid with Twitter Bootstrap. How do I add the closing row </div>
tags after every 2 entries?
I need the HTML to look like this:
<div class="row">
<div class="span6">...</div>
<div class="span6">...</div>
</div>
<div class="row">
<div class="span6">...</div>
</div>
I think I need something like this:
<div class="row">
{exp:channel:entries channel="channel_name" dynamic="no"}
<div class="span4">
...
</div>
<!-- conditional here to close /.row -->
{/exp:channel:entries}
I think I could use {switch}
tag to accomplish this, but I also need a way to close the row if there are an odd number of entries as well. Is there an easy way to do this without using PHP and modulus somehow?