In a view I have the following code to generate an ul:
<ul>
{{for s in socialmedia:}}
<li>
</li>
{{pass}}
</ul>
I use css to display two list items next to each other. To drop this css
I'd like to replace this with bootstrap rows:
<div class="row-fluid">
<div class="span6">
</div> <!-- /span -->
<div class="span6">
</div> <!-- /span -->
</div> <!-- /row -->
<div class="row-fluid">
<div class="span6">
</div> <!-- /span -->
<div class="span6">
</div> <!-- /span -->
</div> <!-- /row -->
I think the solution lies in doing something with odd and even rows in
socialmedia. In case of even do:
<div class="row-fluid">
<div class="span6">
{{=s.}}
</div> <!-- /span -->
In case of odd do:
<div class="span6">
{{=s.}}
</div> <!-- /span -->
</div> <!-- /row -->
The problem is I don't know how to establish whether a row is odd or even,
and how to close the last row in case socialmedia contains an odd number of
rows.
Kind regards,
Annet.