{# Default block settings #}
{% set class = pimcore_input('class').getData() %}
{% set marginTop = pimcore_select('margin_top').getData() %}
{% set marginBottom = pimcore_select('margin_bottom').getData() %}
{% set containerWidth = pimcore_select('container_width').getData() %}
{% set areaClass = class ~ ' ' ~ marginTop ~ ' ' ~ marginBottom ~ ' ' ~ containerWidth %}
{% set anchorId = pimcore_input('anchor').getData() %}
<div class="area area--cols {{ areaClass }}"{% if anchorId %} id="{{ anchorId }}"{% endif %}>
{% set count = pimcore_block('columns').getCount() %}
{% if count == 3 %}
{% set columnSizes = [['', '33% 33% 33%'], ['50-25-25', '50% 25% 25%'], ['25-50-25', '25% 50% 25%'], ['25-25-50', '25% 25% 50%']] %}
{% elseif count == 4 %}
{% set columnSizes = [['', '25% 25% 25% 25%'], ['40-20-20-20', '40% 20% 20% 20%'], ['20-40-20-20', '20% 40% 20% 20%'], ['20-20-40-20', '20% 20% 40% 20%'], ['20-20-20-40', '20% 20% 20% 40%']] %}
{% else %}
{% set columnSizes = [['25-75', '25% 75%'], ['40-60', '40% 60%'], ['', '50% 50%'], ['60-40', '60% 40%'], ['75-25', '75% 25%']] %}
{% endif %}
{% if editmode and count <= 4 %}
{{ pimcore_select('column_sizes', {
'store': columnSizes,
'reload': true,
'defaultValue': ''
}) }}
{% endif %}
<div class="cols cols--{{ count }}{% if pimcore_select('column_sizes').getData() != "" and count <= 4 %} ratio--{{ pimcore_select('column_sizes').getData() }}{% endif %}">
{% for i in pimcore_iterate_block(pimcore_block('columns', {
'limit': 6,
'default': 2,
'reload': true
})) %}
<div class="col">
{{ pimcore_areablock('column_content', {
'controlsTrigger': 'fixed',
'sorting': conecto_get_areabricks(),
'allowed': conecto_get_areabricks(['cols']),
'params': {
'image': {
'parent': containerWidth,
'cols': count
}
}
}) }}
</div>
{% endfor %}
</div>
</div>