Close bootstrap row and start a new row Matrix I need to figure out how to close out the columns if it equals 12 and then open a new row. I have a Matrix field set up with rows, but it needs to break with a new row if the columns equal 12.

Any suggestions?
You could track the total used columns in a var and check if its less than 12.

{% set col_count = 0 %}
{% for item in items %}
    {% switch item.type %}
        {% case "value1" %}
            {% set col_size = 4 %}
        {% case "value2" %}
            {% set col_size = 6 %}
    {% endswitch %}

    {% if not loop.first and (col_count + col_size) &gt; 12 %}
        &lt;/div&gt;
        {% set col_count = 0 %}
    {% endif %}

    {% if col_count == 0 %}
        &lt;div class="row"&gt;
    {% endif %}

    {% set col_count = col_count + col_size %}

    &lt;div class="column small-{{ col_size }}"&gt;
        {{ item.title }}
    &lt;/div&gt;

    {% if loop.last %}
        &lt;/div&gt;
    {% endif %}

{% endfor %}