bs-columns.html.twig in Bootstrap Kit 8.4
{% if content %}
{% set columns = 0 %}
{% for region in layout.getRegionNames if content[region] %}
{% set columns = columns + 1 %}
{% endfor %}
{% if columns > 0 %}
<div {{ attributes.addClass('row') }}>
{% for region in layout.getRegionNames if content[region] %}
<div class="col-md-{{ 12 / columns }}">
{{ content[region] }}
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
File
templates/bs-columns.html.twig
View source
- {% if content %}
-
- {% set columns = 0 %}
- {% for region in layout.getRegionNames if content[region] %}
- {% set columns = columns + 1 %}
- {% endfor %}
-
- {% if columns > 0 %}
- <div {{ attributes.addClass('row') }}>
- {% for region in layout.getRegionNames if content[region] %}
- <div class="col-md-{{ 12 / columns }}">
- {{ content[region] }}
- </div>
- {% endfor %}
- </div>
- {% endif %}
-
- {% endif %}