{# grid ================= Add a CSS Grid Layout Container @param {string} name = Classname #} {% set gridLayoutClass, gridOldRevision, gridInlined, gridInlineStyle, gridLayoutType = '', '', '', '', '' %} {# Pick Grid Setup from the Grid Setup Category #} {% if options.setupChoice is not empty %} {% set gridSetup = options.setupChoice.first() %} {% set gridLayoutClass = ' ' ~ gridSetup.setGridSetup.gridClassName %} {% set gridLayoutType = gridSetup.setGridSetup.gridType %} {% set gridOldRevision = gridSetup.setGridSetup.oldSpec %} {% set gridInlined = gridSetup.setGridSetup.inlinedStyle %} {% set gridInlineStyle = gridSetup.setGridSetup.style %} {% endif %} {# Build Element Block #}
0 %}
{# is no setupClass defined use the InlineGrid Style from the Category #} {% if gridInlined %} {% endif %} {# Insert Grid Boxes #} {% for key, column in content.children %} {% set boxName = column.setGridBoxOptions.boxName ?? null %} {% set gridArea = '' %} {% set gridBoxClassName = '' %} {% if gridLayoutType == 'cssgrid' %} {% if gridOldRevision %} {% if boxName != '' %} {% set gridBoxClassName = gridLayoutClass ~ '__' ~ boxName %} {% else %} {% set gridBoxClassName = gridLayoutClass ~ '__box-' ~ key %} {% endif %} {% else %} {% set gridBoxClassName = gridLayoutClass ~ '__box' %} {% set gridArea = boxName != '' ? ' style=grid-area:'~boxName : ' style=grid-area:box-'~key %} {% endif %} {% else %} {% if gridLayoutClass != '' %} {% set gridBoxClassName = boxName != null ? gridLayoutClass ~ '__' ~ boxName %} {% endif %} {% endif %} {# Refine Classname #} {% set gridBoxClassName = gridBoxClassName |replace({' ':''}) %} {% set gridBoxClassName = ' ' ~ gridBoxClassName %}
{% if column.children|length > 0 %} {% for child in column.children %} {% include '_builder/_cb-objects.html' with { data: child } %} {% endfor %} {% endif %}
{% endfor %}
{% endif %}