custom/plugins/MuehldorferTheme/src/Resources/views/storefront/emz/navigation/categories.html.twig line 1

Open in your IDE?
  1. {% block emz_navigation_dropdown %}
  2.     {% for treeItem in navigationTree %}
  3.         {% set category = treeItem.category %}
  4.         {% set name = category.translated.name %}
  5.         {% set categorId = category.id %}
  6.         {% set children = treeItem.children %}
  7.         <div class="emz-navigation
  8.                             {% if level == 0%}
  9.                                  {% if treeItem.children|length > 0 %}dropdown{% endif %}
  10.                             {% else %}
  11.                                 dropdown-item {% if treeItem.children|length > 0 %}dropright{% endif %}
  12.                             {% endif %}">
  13.             {% if category.type == 'folder' %}
  14.                 <a class="{% if level == 0 %}emz-nav-link emz-sticky-header-nav-item{% else %}emz-sticky-header-drodown-item{% endif %} {% if categorId is same as(activeCategoryId) %} active{% endif %} {%if categorId == "e0e6dd4d85dd467bb1e904a0699e931e"%} {% if context.salesChannel.name != "B2B" %}activehome{% endif %}{% endif %}{%if categorId == "6ba4199bdd4e481c9d68a0d90a49f738"%} {% if context.salesChannel.name == "B2B" %}activeb2b{% endif %}{% endif %}" itemprop="url" {% if category.externalLink %} rel="noopener" {% endif %}  href="{% if category.externalLink %}{{ category.externalLink }}{% else %}{{ seoUrl('frontend.navigation.page', { navigationId: categorId }) }}{% endif %}">
  15.                     <div class="{% if level == 0 %}emz-sticky-header-nav-text{% endif %}" itemprop="name">
  16.                         {{name}}
  17.                     </div>
  18.                 </a>
  19.             {% else %}
  20.                 <a class="{% if level == 0 %}emz-nav-link emz-sticky-header-nav-item{% else %}emz-sticky-header-drodown-item{% endif %} {% if categorId is same as(activeCategoryId) %} active{% endif %}  {%if categorId == "e0e6dd4d85dd467bb1e904a0699e931e"%} {% if context.salesChannel.name != "B2B" %}activehome{% endif %}{% endif %}{%if categorId == "6ba4199bdd4e481c9d68a0d90a49f738"%} {% if context.salesChannel.name == "B2B" %}activeb2b{% endif %}{% endif %}" itemprop="url" {% if category.externalLink %} rel="noopener" {% endif %} href="{% if category.externalLink %}{{ category.externalLink }}{% else %}{{ seoUrl('frontend.navigation.page', { navigationId: categorId }) }}{% endif %}">
  21.                     <div class="{% if level == 0 %}emz-sticky-header-nav-text{% endif %}" itemprop="name">
  22.                         {{name}}
  23.                         {% if treeItem.children|length > 0 and level > 0 %}
  24.                             {% sw_icon 'arrow-medium-right' style {'pack': 'solid', 'size': 'xs' }%}
  25.                         {% endif %}
  26.                     </div>
  27.                 </a>
  28.             {% endif %}
  29.             {% if treeItem.children|length > 0 %}
  30.                 <div class="dropdown-menu">
  31.                     {% sw_include '@Storefront/storefront/emz/navigation/categories.html.twig' with {
  32.                         navigationTree: treeItem.children,
  33.                         level: level + 1
  34.                     }%}
  35.                 </div>
  36.             {% endif %}
  37.         </div>
  38.         <style>
  39.             .emz-sticky-header-nav-item.activehome .emz-sticky-header-nav-text {
  40.                 color: #004594;
  41.                 font-size: 13px;
  42.                 text-transform: uppercase;
  43.                 font-weight: 600;
  44.             }
  45.             .emz-sticky-header-nav-item.activeb2b .emz-sticky-header-nav-text {
  46.                 color: #004594;
  47.                 font-size: 13px;
  48.                 text-transform: uppercase;
  49.                 font-weight: 600;
  50.             }
  51.             .emz-sticky-header-nav-item.activehome .emz-sticky-header-nav-text:after {
  52.                 opacity: 1;
  53.                 -webkit-transform: scale(1);
  54.                 -ms-transform: scale(1);
  55.                 transform: scale(1);
  56.             }
  57.             .emz-sticky-header-nav-item.activeb2b .emz-sticky-header-nav-text:after {
  58.                 opacity: 1;
  59.                 -webkit-transform: scale(1);
  60.                 -ms-transform: scale(1);
  61.                 transform: scale(1);
  62.             }
  63.         </style>
  64.     {% endfor %}
  65. {% endblock %}