custom/plugins/econdWebAnalytics/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. {# @var cmsPage \Shopware\Core\Content\Cms\CmsPageEntity #}
  3. {# @var landingPage \Shopware\Core\Content\LandingPage\LandingPageEntity #}
  4. {% block page_content_sections_inner %}
  5.     <div class="cms-sections">
  6.         {% for section in cmsPage.sections %}
  7.             {% set sectionBgColor = section.backgroundColor %}
  8.             {% set sectionBgImg = section.backgroundMedia|sw_encode_media_url %}
  9.             {% set sectionBgImgMode = section.backgroundMediaMode %}
  10.             {% set sectionClasses = [section.cssClass, 'pos-' ~ section.position, 'cms-section-' ~ section.type] %}
  11.             {% if sectionBgImg %}
  12.                 {% set sectionClasses = ['bg-image']|merge(sectionClasses) %}
  13.             {% endif %}
  14.             {% if sectionBgColor %}
  15.                 {% set sectionClasses = ['bg-color']|merge(sectionClasses) %}
  16.             {% endif %}
  17.             {% if section.visibility is null %}
  18.                 {% set visibility = {
  19.                     mobile: true,
  20.                     tablet: true,
  21.                     desktop: true
  22.                 } %}
  23.             {% else %}
  24.                 {% set visibility = section.visibility %}
  25.             {% endif %}
  26.             {% if not visibility.mobile %}
  27.                 {% set sectionClasses = ['hidden-mobile']|merge(sectionClasses) %}
  28.             {% endif %}
  29.             {% if not visibility.tablet %}
  30.                 {% set sectionClasses = ['hidden-tablet']|merge(sectionClasses) %}
  31.             {% endif %}
  32.             {% if not visibility.desktop %}
  33.                 {% set sectionClasses = ['hidden-desktop']|merge(sectionClasses) %}
  34.             {% endif %}
  35.             {% block page_content_section %}
  36.                 <div class="cms-section {{ sectionClasses|join(' ') }}"
  37.                      style="{% if sectionBgColor %}background-color: {{ sectionBgColor }};{% endif %}{% if sectionBgImg %}background-image: url({{ sectionBgImg }});background-size: {{ section.backgroundMediaMode }};{% endif %}">
  38.                     {% sw_include "@Storefront/storefront/section/cms-section-" ~ section.type ~ ".html.twig" %}
  39.                 </div>
  40.             {% endblock %}
  41.         {% endfor %}
  42.     </div>
  43. {% endblock %}