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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_main_inner %}
  3.     <div class="container-main">
  4.         {% block page_content %}
  5.             {% block cms_breadcrumb %}
  6.                 {% if page.header.navigation.active.level > 2 %}
  7.                     <div class="breadcrumb cms-breadcrumb container">
  8.                         {% sw_include '@Storefront/storefront/layout/breadcrumb.html.twig' with {
  9.                             context: context,
  10.                             category: page.header.navigation.active
  11.                         } only %}
  12.                     </div>
  13.                 {% endif %}
  14.             {% endblock %}
  15.             {% block cms_category_headline %}
  16.                 {% set description = page.header.navigation.active.customFields.custom_category_info_description %}
  17.                 {% if page.header.navigation.active.level > 2 %}
  18.                     <div class="container mb-4">
  19.                         <h1 class="category-headline">{{ page.header.navigation.active.name }}</h1>
  20. {#                        <span class="category-description">{{ description|striptags|raw  }}</span>#}
  21.                     </div>
  22.                 {% endif %}
  23.             {% endblock %}
  24.             {% block cms_category_description %}
  25.                 {% set description = page.header.navigation.active.customFields.custom_category_info_description %}
  26.                 {% set imgMediaId = page.header.navigation.active.customFields.custom_category_info_image %}
  27.                 {% set iconMediaId = page.header.navigation.active.customFields.custom_category_info_icon %}
  28.                 {% set attribute_1 = page.header.navigation.active.customFields.custom_category_info_attribute_1 %}
  29.                 {% set attribute_2 = page.header.navigation.active.customFields.custom_category_info_attribute_2 %}
  30.                 {% if imgMediaId %}
  31.                     {% set media = searchMedia([imgMediaId], context.context) %}
  32.                     {% set img = media.get(imgMediaId) %}
  33.                     {% if iconMediaId %}
  34.                         {% set mediaIcon = searchMedia([iconMediaId], context.context) %}
  35.                         {% set icon = mediaIcon.elements|first %}
  36.                     {% endif %}
  37.                     <div class="category-description-container cms-block-text-on-image">
  38.                         <div class="cms-block bg-image">
  39.                             <img src="{{ img.url }}" class="cms-block-background media-mode--cover">
  40.                             <div class="cms-block-container">
  41.                                 <div class="category-description-wrapper d-flex flex-sm-column-reverse col-12 p-0">
  42.                                     <div class="d-flex flex-column flex-sm-row justify-content-between">
  43.                                         <span class="d-flex flex-column-reverse category-description">{{ description|striptags|raw  }}</span>
  44.                                         <div class="d-flex">
  45.                                             {% if iconMediaId %} <img class="category-icon" src="{{ icon.url }}">{% endif %}
  46.                                             <div class="category-description-attributes d-flex flex-column justify-content-end">
  47.                                                 <span class="attr attr-1">{{ attribute_1 }}</span>
  48.                                                 <span class="attr attr-2">{{ attribute_2 }}</span>
  49.                                             </div>
  50.                                         </div>
  51.                                     </div>
  52.                                 </div>
  53.                             </div>
  54.                         </div>
  55.                     </div>
  56.                 {% endif %}
  57.             {% endblock %}
  58.             {% block cms_content %}
  59.                 <div class="cms-page">
  60.                     {% block page_content_blocks %}
  61.                         {% sw_include "@Storefront/storefront/page/content/detail.html.twig" with {'cmsPage': page.cmsPage} %}
  62.                     {% endblock %}
  63.                 </div>
  64.             {% endblock %}
  65.         {% endblock %}
  66.     </div>
  67. {% endblock %}