Saturday, December 29, 2012

Bootstrap grid with {%ifchanged xx%}


 <div>
    <div class="row-fluid"></div> #otherwise not in position
    {% for block in blocks %}
        {% if forloop.counter|divisibleby:"6" %}
            <div class="row">
        {% endif %}
        {% ifchanged block.code %}
            <div class="span2">
            {{ block.code }}
            </div>
        {% endifchanged %}
        {% if forloop.counter|divisibleby:"6" %}
            </div>
        {% endif %}
    {% endfor %}
    </div>

No comments:

Post a Comment