title: Add div after every 3d element twig loop, modulus
body: <p>Hi so i have this twig loop, and what i need to to is after every 3rd element to add some html to close div row and open new one.</p>
  
  <p>I tried with various snippets from this website but no luck with any one of them</p>
  
  
  
  <pre><code>&lt;div class="row"&gt;
      {% for date, date_info in dates %}
          &lt;div class="col-sm-4"&gt;
              &lt;div class="event-box"&gt;
                  {% for category in date_info.events %}
                      {% for event in category %}
                          &lt;div class="event-header"&gt;
                              {% if event.get_runtime( 'content_img_url' ) is empty %}
                                  {{ event | avatar( [
                                  'post_thumbnail',
                                  'location_avatar',
                                  'category_avatar'
                                  ]) | raw }}
                              {% endif %}
                              &lt;div class="event-date"&gt;
                                  {{ date | month }}
                                  {{ date | day }}
                              &lt;/div&gt;
                              &lt;div class="event-footer"&gt;
                                  &lt;h3&gt;{{ event.get_runtime( 'filtered_title' ) | raw }}&lt;/h3&gt;
                                  &lt;div class="event-time"&gt;
                                      {{ event | timespan( 'short' ) | raw }}...
                                  &lt;/div&gt;
                                  &lt;div class="event-content"&gt; {{ event.get_runtime( 'filtered_content' ) | slice(0,200) | raw }}&lt;/div&gt;
  
                                  &lt;a  class="btn btn-success" href="{{ event.get_runtime( 'instance_permalink' ) | e('html_attr') }}"&gt;
                                      {{ text_read_more }}
                                  &lt;/a&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      {% endfor %} {# event in category #}
                  {% endfor %} {# category in date_info.events #}
              &lt;/div&gt;
          &lt;/div&gt;
      {% endfor %} {# date, date_info in dates #}
  &lt;/div&gt;
  </code></pre>