custom/plugins/zenitPlatformStratus/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 base_main_inner %}
  3.     <div class="container-main">
  4.         {% block page_content %}
  5.             {# ... checks if custom zenit-breadcrumb is in use #}
  6.             {% set defaultBreadcrumbs = true %}
  7.             {% for section in page.cmsPage.sections %}
  8.                 {% for block in section.blocks %}
  9.                     {% if block.type is same as ('zenit-breadcrumb') %}
  10.                         {% set defaultBreadcrumbs = false %}
  11.                     {% endif %}
  12.                 {% endfor %}
  13.             {% endfor %}
  14.             {% if theme_config("zen-category-header-position") is same as ('absolute') or (theme_config("zen-category-header-position") is same as ('relative') and zenCustomFields.category.zenit_stratus_category_header_position is same as ('absolute')) %}
  15.                 {% set sectionCategoryOverlay = true %}
  16.             {% endif %}
  17.             {% if theme_config("zen-category-image") is same as (true) or ( theme_config("zen-category-image") is same as (false) and (zenCustomFields.category.zenit_stratus_category_image is same as ('display')) ) %}
  18.                 {% set hasCategoryImage = true %}
  19.             {% endif %}
  20.             {% if zenCustomFields.category.zenit_stratus_category_image_color is not empty and zenCustomFields.category.zenit_stratus_category_image_color is not same as ('inherit') %}
  21.                 {% set hasCategoryBgColor = true %}
  22.             {% endif %}
  23.             {% if hasCategoryBgColor is same as (true) or hasCategoryImage is same as (true) %}
  24.                 {% set isHeroSection = true %}
  25.             {% endif %}
  26.             {# ... if not a hero section #}
  27.             {% if isHeroSection is not same as (true) and defaultBreadcrumbs %}
  28.                 {# ... check if there is any breadcrumb to show #}
  29.                 {% if sw_breadcrumb_full(page.header.navigation.active, context.context) %}
  30.                     <div class="breadcrumb-container">
  31.                         <div class="container">
  32.                             <div class="breadcrumb-wrap cms-breadcrumb justify-content-{{ theme_config('zen-breadcrumbs-align')|replace({'flex-': ''}) }}">
  33.                                 {% block cms_breadcrumb %}
  34.                                     {% sw_include '@Storefront/storefront/layout/breadcrumb.html.twig' with {
  35.                                         navigationTree: page.header.navigation.tree,
  36.                                         category: page.header.navigation.active
  37.                                     } only %}
  38.                                 {% endblock %}
  39.                             </div>
  40.                         </div>
  41.                     </div>
  42.                 {% endif %}
  43.             {% endif %}
  44.             <div class="cms-page">
  45.                 {% block page_content_blocks %}
  46.                     {% sw_include "@Storefront/storefront/page/content/detail.html.twig" with {
  47.                         'cmsPage': page.cmsPage,
  48.                         'defaultBreadcrumbs': defaultBreadcrumbs,
  49.                         'sectionCategoryOverlay': sectionCategoryOverlay,
  50.                         'hasCategoryImage': hasCategoryImage,
  51.                         'hasCategoryBgColor': hasCategoryBgColor,
  52.                         'isHeroSection': isHeroSection
  53.                     } %}
  54.                 {% endblock %}
  55.             </div>
  56.         {% endblock %}
  57.     </div>
  58. {% endblock %}