custom/plugins/SwagHoggi/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_sections_inner %}
  3.     <div class="cms-sections">
  4.         {% for section in cmsPage.sections %}
  5.             {% set sectionBgColor = section.backgroundColor %}
  6.             {% set sectionBgImg = section.backgroundMedia|sw_encode_media_url %}
  7.             {% set sectionBgImgMode = section.backgroundMediaMode %}
  8.             {% set sectionClasses = [section.cssClass, 'pos-' ~ section.position, 'cms-section-' ~ section.type] %}
  9.             {% if sectionBgImg %}
  10.                 {% set sectionClasses = ['bg-image']|merge(sectionClasses) %}
  11.             {% endif %}
  12.             {% if sectionBgColor %}
  13.                 {% set sectionClasses = ['bg-color']|merge(sectionClasses) %}
  14.             {% endif %}
  15.             {% block page_content_section %}
  16.                 <div class="cms-section {{ sectionClasses|join(' ') }}" style="{% if sectionBgColor %}background-color: {{ sectionBgColor }};{% endif %}{% if sectionBgImg %}background-image: url({{ sectionBgImg }});background-size: {{ section.backgroundMediaMode }};{% endif %}">
  17.                     {% sw_include "@Storefront/storefront/section/cms-section-" ~ section.type ~ ".html.twig" %}
  18.                 </div>
  19.             {% endblock %}
  20.         {% endfor %}
  21.     </div>
  22. {% endblock %}