{# Tab === Tabs only with CSS, therefore only one tab container per page. If this is not enough, the functionality must be expanded with JS. The Container tab contains a ContentBuilder. @param {string} name = Classname @param {object} data = dataobject @param {string} data.style = Optional Styleclass Name #} {% import '_macros/my-macro.html' as _ %} {% macro tabBlock(classname, child, key) %} {# Random Number for identify tabgroup#} {% set tabGroup = random(5000) %}
{% for child in child.children %} {% include '_builder/_cb-objects' with { data: child } %} {% endfor %}
{% endmacro %} {# Build Element Block #}
{# Loop through #} {% switch content.type.handle %} {% case 'objSection' %} {% for child in content.children %} {% for child in child.children %} {% for child in child.children %} {{ _self.tabBlock('c-tab', child)}} {% endfor %} {% endfor %} {% endfor %} {% default %} {% for child in content.children %} {{ _self.tabBlock('c-tab', child)}} {% endfor %} {% endswitch %}