I've got the following code in a view:
<tbody>
{{for i,row in enumerate(rows):}}
{{if (i + 1) % 3 == 1:}}
<tr><td>
<div class="row">
<div class="col-md-4">
{{include 'default/thumbnail.html'}}
</div> <!-- /.col-md-4 -->
{{elif (i + 1) % 3 == 2:}}
<div class="col-md-4">
{{include 'default/thumbnail.html'}}
</div> <!-- /.col-md-4 -->
{{elif (i + 1) % 3 == 0:}}
<div class="col-md-4">
{{include 'default/thumbnail.html'}}
</div> <!-- /.col-md-4 -->
</div> <!-- /.row -->
</td></tr>
{{pass}}
{{pass}}
{{if not (i + 1) % 3 == 0:}}
</div> <!-- /.row -->
</td></tr>
{{pass}}
</tbody>
This code comes from a pre bootstrap app, I only made adjustments to style
it the bootstrap way.
What I want is a table with <tr><td> containing a bootstrap grid containing:
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-3">
{{include 'default/thumbnail.html'}}
</div> <!-- /.col-xs-12 col-sm-6 col-md-3 -->
</div> <!-- /.row -->
rows contains between 60 and 80 records of which I want to display 12 per
<tr><td>
I tried a nested for loop but I do not get it to work properly, I hope one
of you
can point me in the right direction.
Regards,
Annet
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.