Created
April 22, 2012 19:17
-
-
Save asmedrano/2466271 to your computer and use it in GitHub Desktop.
New Twitter Bootstrap row every Nth item.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%for item in items%} | |
{% if forloop.first or forloop.counter0|divisibleby:3 %} | |
<div class = "row"> | |
{%endif%} | |
{# We need to add a new Bootstrap row every after every third item item#} | |
<div class = "span4"> | |
<h3><a href ="">{{title}}</a></h3> | |
<span>Posted on {{created_on}} </span> | |
</div> | |
{% if forloop.last or forloop.counter|divisibleby:3 %} | |
{#close it out#} | |
</div> | |
{%endif%} | |
{%endfor%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment