custom/plugins/TcinnThemeWareModern/src/Resources/views/storefront/layout/breadcrumb.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/breadcrumb.html.twig' %}
  2. {# ThemeWare® HC-Architecture® via configuration #}
  3. {# TODO: prüfen... #}
  4. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  5. {# ThemeWare: Set theme variables #}
  6. {% set twtBreadcrumbCompatibility = theme_config('twt-breadcrumb-compatibility') %}
  7. {% set twtBreadcrumbFurtherInformation = theme_config('twt-breadcrumb-further-information') %}
  8. {% set twtBreadcrumbSeparatorStyle = theme_config('twt-breadcrumb-separator-style') %}
  9. {% set homeLabel = context.salesChannel.translated.homeName|default("general.homeLink"|trans) %}
  10. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  11. {# TODO: Check if "Add wrapper 'breadcrumb-inner-container' around breadcrumb for further formatting" is needed. #}
  12. {# ThemeWare: Changes on the breadcrumb #}
  13. {# HC-Architecture @Doku #}
  14. {% block layout_breadcrumb_list %}
  15.     {% if twtBreadcrumbCompatibility != 1 %}
  16.         <ol class="breadcrumb"
  17.             itemscope
  18.             itemtype="https://schema.org/BreadcrumbList">
  19.             {% block twt_component_listing_breadcrumb_further_information %}
  20.                 {# ThemeWare: Add futher information snippet #}
  21.                 {% if twtBreadcrumbFurtherInformation == 3 or twtBreadcrumbFurtherInformation == 4 or twtBreadcrumbFurtherInformation == 6 %}
  22.                     <div class="breadcrumb-container twt-breadcrumb-further-information">
  23.                         <span>{{ "twt.breadcrumb.furtherInformation"|trans|sw_sanitize }}</span>
  24.                     </div>
  25.                 {% endif %}
  26.                 {# ThemeWare: Add home icon #}
  27.                 {% if twtBreadcrumbFurtherInformation == 2 or twtBreadcrumbFurtherInformation == 4 %}
  28.                     <li class="breadcrumb-item twt-breadcrumb-home-icon"
  29.                         itemprop="itemListElement"
  30.                         itemscope
  31.                         itemtype="https://schema.org/ListItem">
  32.                         <a href="{{ path('frontend.home.page') }}"
  33.                            class="home-link{% if controllerAction is same as('home') %} is-active{% endif %}"
  34.                            title="{{ homeLabel|striptags }}"
  35.                            itemprop="item">
  36.                             <link itemprop="url"
  37.                                   href="{{ path('frontend.home.page') }}"/>
  38.                             {% sw_icon 'home' %}
  39.                             <span class="breadcrumb-title" itemprop="name">{{ "general.homeLink"|trans|sw_sanitize }}</span>
  40.                         </a>
  41.                         <meta itemprop="position" content="0"/>
  42.                     </li>
  43.                 {% endif %}
  44.                 {# ThemeWare: Add home link #}
  45.                 {% if twtBreadcrumbFurtherInformation == 5 or twtBreadcrumbFurtherInformation == 6 %}
  46.                     <li class="breadcrumb-item twt-breadcrumb-home-link"
  47.                         itemprop="itemListElement"
  48.                         itemscope
  49.                         itemtype="https://schema.org/ListItem">
  50.                         <a href="{{ path('frontend.home.page') }}"
  51.                            class="home-link{% if controllerAction is same as('home') %} is-active{% endif %}"
  52.                            title="{{ homeLabel|striptags }}"
  53.                            itemprop="item">
  54.                             <link itemprop="url"
  55.                                   href="{{ path('frontend.home.page') }}"/>
  56.                             <span class="breadcrumb-title" itemprop="name">{{ "general.homeLink"|trans|sw_sanitize }}</span>
  57.                         </a>
  58.                         <meta itemprop="position" content="0"/>
  59.                     </li>
  60.                 {% endif %}
  61.                 {# ThemeWare: Add separator #}
  62.                 {% if (twtBreadcrumbFurtherInformation == 2 or twtBreadcrumbFurtherInformation == 5 or twtBreadcrumbFurtherInformation == 4 or twtBreadcrumbFurtherInformation == 6) and controllerAction is not same as('home') %}
  63.                     <div class="breadcrumb-placeholder">
  64.                         {% if twtBreadcrumbSeparatorStyle == 2 %}
  65.                             {% sw_icon 'arrow-medium-double-right' style { 'size': 'fluid', 'pack': 'solid'} %}
  66.                         {% elseif twtBreadcrumbSeparatorStyle == 3 %}
  67.                             {% sw_icon 'arrow-right' %}
  68.                         {% elseif twtBreadcrumbSeparatorStyle == 10 %}
  69.                             <span class="text slash">/</span>
  70.                         {% elseif twtBreadcrumbSeparatorStyle == 11 %}
  71.                             <span class="text dot">•</span>
  72.                         {% elseif twtBreadcrumbSeparatorStyle == 12 %}
  73.                             <span class="text pipe">|</span>
  74.                         {% elseif twtBreadcrumbSeparatorStyle == 13 %}
  75.                             <span class="text dash">—</span>
  76.                         {% else %}
  77.                             {# Default #}
  78.                             {% sw_icon 'arrow-medium-right' style { 'size': 'fluid', 'pack': 'solid'} %}
  79.                         {% endif %}
  80.                     </div>
  81.                 {% endif %}
  82.             {% endblock %}
  83.             {# Default #}
  84.             {% for breadcrumbCategory in breadcrumbCategories %}
  85.                 {% set key = breadcrumbCategory.id %}
  86.                 {% set name = breadcrumbCategory.translated.name %}
  87.                 {{ block('layout_breadcrumb_list_item') }}
  88.                 {{ block('layout_breadcrumb_placeholder') }}
  89.             {% endfor %}
  90.         </ol>
  91.     {% else %}
  92.         {# Default block #}
  93.         {{ parent() }}
  94.     {% endif %}
  95. {% endblock %}
  96. {# ThemeWare: Change separator icon #}
  97. {# HC-Architecture @Doku #}
  98. {% block layout_breadcrumb_placeholder %}
  99.     {% if twtBreadcrumbCompatibility != 1 %}
  100.         {% if key != breadcrumbKeys|last %}
  101.             <div class="breadcrumb-placeholder">
  102.                 {% if twtBreadcrumbSeparatorStyle == 2 %}
  103.                     {% sw_icon 'arrow-medium-double-right' style { 'size': 'fluid', 'pack': 'solid'} %}
  104.                 {% elseif twtBreadcrumbSeparatorStyle == 3 %}
  105.                     {% sw_icon 'arrow-right' %}
  106.                 {% elseif twtBreadcrumbSeparatorStyle == 10 %}
  107.                     <span class="text slash">/</span>
  108.                 {% elseif twtBreadcrumbSeparatorStyle == 11 %}
  109.                     <span class="text dot">•</span>
  110.                 {% elseif twtBreadcrumbSeparatorStyle == 12 %}
  111.                     <span class="text pipe">|</span>
  112.                 {% elseif twtBreadcrumbSeparatorStyle == 13 %}
  113.                     <span class="text dash">—</span>
  114.                 {% else %}
  115.                     {# Default #}
  116.                     {% sw_icon 'arrow-medium-right' style { 'size': 'fluid', 'pack': 'solid'} %}
  117.                 {% endif %}
  118.             </div>
  119.         {% endif %}
  120.     {% else %}
  121.         {# Default block #}
  122.         {{ parent() }}
  123.     {% endif %}
  124. {% endblock %}