custom/plugins/SalvanaPferde2022/src/Resources/views/storefront/page/content/index.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/content/index.html.twig' %}
  2. {% block page_content %}
  3.   {% if page.cmsPage.sections|length and page.cmsPage.sections.first().blocks|length == 1 and (page.cmsPage.sections.first().blocks.first().type in ['image','text-on-image']) %}
  4.     {% set teaserKey = page.cmsPage.sections.getKeys()[0] %}
  5.     {% set hasTeaser = page.cmsPage.sections.get(teaserKey) %}
  6.     {% set dummy = page.cmsPage.sections.remove(teaserKey) %}
  7.   {% else %}
  8.     {% set hasTeaser = 0 %}
  9.   {% endif %}
  10.   {% if hasTeaser %}
  11.     {% set section = hasTeaser %}
  12.     {% set sectionBgColor = section.backgroundColor %}
  13.     {% set sectionBgImg = section.backgroundMedia|sw_encode_media_url %}
  14.     {% set sectionBgImgMode = section.backgroundMediaMode %}
  15.     {% set sectionClasses = [section.cssClass, 'pos-' ~ section.position, 'cms-section-' ~ section.type] %}
  16.     {% if sectionBgImg %}
  17.       {% set sectionClasses = ['bg-image']|merge(sectionClasses) %}
  18.     {% endif %}
  19.     {% if sectionBgColor %}
  20.       {% set sectionClasses = ['bg-color']|merge(sectionClasses) %}
  21.     {% endif %}
  22.     <div class="cms-teaser"
  23.          style="{% if sectionBgColor %}background-color: {{ sectionBgColor }};{% endif %}{% if sectionBgImg %}background-image: url({{ sectionBgImg }});background-size: {{ section.backgroundMediaMode }};{% endif %}">
  24.       {% sw_include "@Storefront/storefront/section/cms-section-" ~ section.type ~ ".html.twig" %}
  25.     </div>
  26.   {% endif %}
  27.   {% if controllerAction|lower != 'home' %}
  28.     <div class="breadcrumb cms-breadcrump container" itemscope itemtype="http://schema.org/BreadcrumbList">
  29.       {% block cms_breadcrumb %}
  30.       {% endblock %}
  31.     </div>
  32.   {% endif %}
  33.   <div class="cms-page">
  34.     {% block page_content_blocks %}
  35.       {% sw_include "@Storefront/storefront/page/content/detail.html.twig" with {'cmsPage': page.cmsPage} %}
  36.     {% endblock %}
  37.   </div>
  38. {% endblock %}