...

Text file src/github.com/noirbizarre/gonja/testData/filters/batch.tpl

Documentation: github.com/noirbizarre/gonja/testData/filters

     1<table>
     2{%- for row in [0, 1, 2, 3, 4, 5, 6]|batch(3) %}
     3  <tr>
     4  {%- for column in row %}
     5    <td>{{ column }}</td>
     6  {%- endfor %}
     7  </tr>
     8{%- endfor %}
     9</table>
    10
    11<table>
    12{%- for row in [0, 1, 2, 3, 4, 5, 6]|batch(3, 'filled') %}
    13  <tr>
    14  {%- for column in row %}
    15    <td>{{ column }}</td>
    16  {%- endfor %}
    17  </tr>
    18{%- endfor %}
    19</table>

View as plain text