vendor/conecto/pimcore-provider/src/ProviderBundle/Resources/views/areas/cols/view.html.twig line 1

Open in your IDE?
  1. {# Default block settings #}
  2. {% set class = pimcore_input('class').getData() %}
  3. {% set marginTop = pimcore_select('margin_top').getData() %}
  4. {% set marginBottom = pimcore_select('margin_bottom').getData() %}
  5. {% set containerWidth = pimcore_select('container_width').getData() %}
  6. {% set areaClass = class ~ ' ' ~ marginTop ~ ' ' ~ marginBottom ~ ' ' ~ containerWidth %}
  7. {% set anchorId = pimcore_input('anchor').getData() %}
  8. <div class="area area--cols {{ areaClass }}"{% if anchorId %} id="{{ anchorId }}"{% endif %}>
  9.     {% set count = pimcore_block('columns').getCount() %}
  10.     {% if count == 3 %}
  11.         {% set columnSizes = [['', '33% 33% 33%'], ['50-25-25', '50% 25% 25%'], ['25-50-25', '25% 50% 25%'], ['25-25-50', '25% 25% 50%']] %}
  12.     {% elseif count == 4 %}
  13.         {% 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%']] %}
  14.     {% else %}
  15.         {% set columnSizes = [['25-75', '25% 75%'], ['40-60', '40% 60%'], ['', '50% 50%'], ['60-40', '60% 40%'], ['75-25', '75% 25%']] %}
  16.     {% endif %}
  17.     {% if editmode and count <= 4 %}
  18.     {{ pimcore_select('column_sizes', {
  19.         'store': columnSizes,
  20.         'reload': true,
  21.         'defaultValue': ''
  22.     }) }}
  23.     {% endif %}
  24.     <div class="cols cols--{{ count }}{% if pimcore_select('column_sizes').getData() != "" and count <= 4 %} ratio--{{ pimcore_select('column_sizes').getData() }}{% endif %}">
  25.         {% for i in pimcore_iterate_block(pimcore_block('columns', {
  26.             'limit': 6,
  27.             'default': 2,
  28.             'reload': true
  29.         })) %}
  30.             <div class="col">
  31.                 {{ pimcore_areablock('column_content', {
  32.                     'controlsTrigger': 'fixed',
  33.                     'sorting': conecto_get_areabricks(),
  34.                     'allowed': conecto_get_areabricks(['cols']),
  35.                     'params': {
  36.                         'image': {
  37.                             'parent': containerWidth,
  38.                             'cols': count
  39.                         }
  40.                     }
  41.                 }) }}
  42.             </div>
  43.         {% endfor %}
  44.     </div>
  45. </div>