adaptivetheme-8.x-3.x-dev/at_core/layout_plugin/templates/threecol/at-layout--threecol.html.twig
at_core/layout_plugin/templates/threecol/at-layout--threecol.html.twig
{#
/**
* @file
* Adaptivetheme implementation to display a three column Layout Plugin layout.
*
* Available variables:
* - content: holds layout regions.
* - attributes: layout attributes.
#}
{%- set int = [] -%}
{%- for region in ['col_1', 'col_2', 'col_3'] %}
{%- if content["#{region}"]|render|trim is not empty -%}
{%- set int = int|merge([region|slice(4, 1)]) -%}
{%- endif -%}
{%- endfor -%}
{%- set layout_classes = ['l-arc--' ~ int|length, 'l-ac--' ~ int|join('-')] -%}
{%- set element = html_element|default('div') -%}
<{{- element }}{{ attributes.addClass(layout_classes) -}}>
{% if content.top|render|trim is not empty %}
<div class="atl__lr">
<div class="atl__lc atl__top">
{{ content.top }}
</div>
</div>
{% endif %}
{% if content.col_1 or content.col_2 or content.col_3 %}
<div class="atl__lr atl__cw">
{% if content.col_1|render|trim is not empty %}
<div class="atl__lc lc-1">
{{ content.col_1 }}
</div>
{% endif %}
{% if content.col_2|render|trim is not empty %}
<div class="atl__lc lc-2">
{{ content.col_2 }}
</div>
{% endif %}
{% if content.col_3|render|trim is not empty %}
<div class="atl__lc lc-3">
{{ content.col_3 }}
</div>
{% endif %}
</div>
{% endif %}
{% if content.bottom|render|trim is not empty %}
<div class="atl__lr">
<div class="atl__lc atl__bottom">
{{ content.bottom }}
</div>
</div>
{% endif %}
</{{ element }}>
