title: For every 10 records print something using Symfony2 and Twig
body: <p>I'm building a page where member addresses are printed to a sheet of labels, and once a sheet is full with 14 addresses on a page, I then want to put a page break after it so that the addresses can be printed on multiple sheets of paper.</p>
  
  <p>How can I achieve this using Twig?</p>
  
  <p>This is my current Twig code:</p>
  
  <pre><code>{% for row in data %}
      &lt;div class="label-page"&gt;
          &lt;div class="label-section L7163"&gt;
              &lt;p&gt;{{row.FirstName}} {{row.Surname}}&lt;/p&gt;
              &lt;p&gt;{{row.AddressLine1}}&lt;/p&gt;
              {% if row.AddressLine2 != NULL or row.AddressLine2 != '' %}
                  &lt;p&gt;{{row.AddressLine2}}&lt;/p&gt;
              {% endif %}
              {% if row.Town != NULL or row.Town != '' %}
                  &lt;p&gt;{{row.Town}}&lt;/p&gt;
              {% endif %}
              {% if row.County != NULL or row.County != '' %}
                  &lt;p&gt;{{row.County}}&lt;/p&gt;
              {% endif %}
              {% if row.Postcode != NULL or row.Postcode != '' %}
                  &lt;p&gt;{{row.Postcode}}&lt;/p&gt;
              {% endif %}
          &lt;/div&gt;
      &lt;/div&gt;
  {% endfor %}
  </code></pre>