custom/plugins/AcrisCmsCS/src/Resources/views/storefront/page/content/detail.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/content/detail.html.twig' %}
  2. {% block page_content_section %}
  3.     {% if section.customFields.acris_cms_margin_top is null or section.customFields.acris_cms_margin_top == 'pixel' %}
  4.         {% set marginTop = section.customFields.acrisCmsPixelMarginTop ? section.customFields.acrisCmsPixelMarginTop : 0 %}
  5.         {% set sectionClasses = ['acris-pixel-margin-top']|merge(sectionClasses) %}
  6.     {% else %}
  7.         {% set marginTop = 0 %}
  8.     {% endif %}
  9.     {% if section.customFields.acris_cms_margin_bot is null or section.customFields.acris_cms_margin_bot == 'pixel' %}
  10.         {% set marginBottom = section.customFields.acrisCmsPixelMarginBot ? section.customFields.acrisCmsPixelMarginBot : 0 %}
  11.         {% set sectionClasses = ['acris-pixel-margin-bottom']|merge(sectionClasses) %}
  12.     {% else %}
  13.         {% set marginBottom = 0 %}
  14.     {% endif %}
  15.     {% if section.customFields.acris_cms_margin_left is null or section.customFields.acris_cms_margin_left == 'pixel' %}
  16.         {% set marginLeft = section.customFields.acrisCmsPixelMarginLeft ? section.customFields.acrisCmsPixelMarginLeft : 0 %}
  17.         {% set sectionClasses = ['acris-pixel-margin-left']|merge(sectionClasses) %}
  18.     {% else %}
  19.         {% set marginLeft = 0 %}
  20.     {% endif %}
  21.     {% if section.customFields.acris_cms_margin_right is null or section.customFields.acris_cms_margin_right == 'pixel' %}
  22.         {% set marginRight = section.customFields.acrisCmsPixelMarginRight ? section.customFields.acrisCmsPixelMarginRight : 0 %}
  23.         {% set sectionClasses = ['acris-pixel-margin-right']|merge(sectionClasses) %}
  24.     {% else %}
  25.         {% set marginRight = 0 %}
  26.     {% endif %}
  27.     <style>
  28.         {% if  marginTop > 0 %}
  29.         #acris_cms_section_{{ section.id }} .cms-section.acris-pixel-margin-top {
  30.             margin-top: {{ marginTop }};
  31.         }
  32.         {% endif %}
  33.         {% if  marginBottom > 0 %}
  34.         #acris_cms_section_{{ section.id }} .cms-section.acris-pixel-margin-bottom {
  35.             margin-bottom: {{ marginBottom }};
  36.         }
  37.         {% endif %}
  38.         {% if  marginLeft > 0 %}
  39.         #acris_cms_section_{{ section.id }} .cms-section.acris-pixel-margin-left {
  40.             margin-left: {{ marginLeft }};
  41.         }
  42.         {% endif %}
  43.         {% if  marginRight > 0 %}
  44.         #acris_cms_section_{{ section.id }} .cms-section.acris-pixel-margin-right {
  45.             margin-right: {{ marginRight }};
  46.         }
  47.         {% endif %}
  48.     </style>
  49.     {% set topMarginClass = '' %}
  50.     {% if section.customFields.acris_cms_margin_top and section.customFields.acris_cms_margin_top != 'no' and section.customFields.acris_cms_margin_top != 'pixel' %}
  51.         {% set topMarginClass = section.customFields.acris_cms_margin_top %}
  52.         {% set sectionClasses = [topMarginClass]|merge(sectionClasses) %}
  53.     {% endif %}
  54.     {% set botMarginClass = '' %}
  55.     {% if section.customFields.acris_cms_margin_bot and section.customFields.acris_cms_margin_bot != 'no' and section.customFields.acris_cms_margin_bot != 'pixel' %}
  56.         {% set botMarginClass = section.customFields.acris_cms_margin_bot %}
  57.         {% set sectionClasses = [botMarginClass]|merge(sectionClasses) %}
  58.     {% endif %}
  59.     {% set leftMarginClass = '' %}
  60.     {% if section.customFields.acris_cms_margin_left and section.customFields.acris_cms_margin_left != 'no' and section.customFields.acris_cms_margin_left != 'pixel' %}
  61.         {% set leftMarginClass = section.customFields.acris_cms_margin_left %}
  62.         {% set sectionClasses = [leftMarginClass]|merge(sectionClasses) %}
  63.     {% endif %}
  64.     {% set rightMarginClass = '' %}
  65.     {% if section.customFields.acris_cms_margin_right and section.customFields.acris_cms_margin_right != 'no' and section.customFields.acris_cms_margin_right != 'pixel' %}
  66.         {% set rightMarginClass = section.customFields.acris_cms_margin_right %}
  67.         {% set sectionClasses = [rightMarginClass]|merge(sectionClasses) %}
  68.     {% endif %}
  69.     {% if section.customFields.acris_responsive_view %}
  70.         {% if section.customFields.acris_responsive_view.xs == true %}
  71.             {% set viewportClasses = 'd-block' %}
  72.         {% else %}
  73.             {% set viewportClasses = 'd-none' %}
  74.         {% endif %}
  75.         {% if section.customFields.acris_responsive_view.sm == true %}
  76.             {% set viewportClasses = viewportClasses ~ ' d-sm-block' %}
  77.         {% else %}
  78.             {% set viewportClasses = viewportClasses ~ ' d-sm-none' %}
  79.         {% endif %}
  80.         {% if section.customFields.acris_responsive_view.md == true %}
  81.             {% set viewportClasses = viewportClasses ~ ' d-md-block' %}
  82.         {% else %}
  83.             {% set viewportClasses = viewportClasses ~ ' d-md-none' %}
  84.         {% endif %}
  85.         {% if section.customFields.acris_responsive_view.lg == true %}
  86.             {% set viewportClasses = viewportClasses ~ ' d-lg-block' %}
  87.         {% else %}
  88.             {% set viewportClasses = viewportClasses ~ ' d-lg-none' %}
  89.         {% endif %}
  90.         {% if section.customFields.acris_responsive_view.xl == true %}
  91.             {% set viewportClasses = viewportClasses ~ ' d-xl-block' %}
  92.         {% else %}
  93.             {% set viewportClasses = viewportClasses ~ ' d-xl-none' %}
  94.         {% endif %}
  95.         {% set sectionClasses = [viewportClasses]|merge(sectionClasses) %}
  96.     {% endif %}
  97.     <div class="acris-cms-custom-section" id="acris_cms_section_{{ section.id }}">
  98.         {{ parent() }}
  99.     </div>
  100. {% endblock %}