custom/plugins/EweTheme/src/Resources/views/storefront/layout/navigation/navigation.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  2. {% block layout_main_navigation_menu_items %}
  3.     {% if page.product is defined %}
  4.         {% set activePath = page.product.categoryTree %}
  5.     {% else %}
  6.         {% set activePath = page.header.navigation.active.path %}
  7.     {% endif %}
  8.     {% for treeItem in page.header.navigation.tree %}
  9.         {% set category = treeItem.category %}
  10.         {% set name = category.translated.name %}
  11.         {# @deprecated tag:v6.5.0 - Use "category.id" directly instead. #}
  12.         {% set categorId = category.id %}
  13.         {% block layout_main_navigation_menu_item %}
  14.             {% if category.type == 'folder' %}
  15.                 <div
  16.                     class="nav-link main-navigation-link{% if category.id == page.header.navigation.active.id or category.id in activePath %} active{% endif %}"
  17.                     {% if treeItem.children|length > 0 %}
  18.                         data-flyout-menu-trigger="{{ category.id }}"
  19.                     {% endif %}
  20.                     title="{{ name }}">
  21.                     <div class="main-navigation-link-text">
  22.                         <span itemprop="name">{{ name }}</span>
  23.                     </div>
  24.                 </div>
  25.             {% else %}
  26.                 <a class="nav-link main-navigation-link{% if category.id == page.header.navigation.active.id or category.id in activePath %} active{% endif %}"
  27.                    href="{{ category_url(category) }}"
  28.                    itemprop="url"
  29.                    {% if treeItem.children|length > 0 %}data-flyout-menu-trigger="{{ category.id }}"{% endif %}
  30.                     {% if category_linknewtab(category) %}target="_blank"{% endif %}
  31.                    title="{{ name }}">
  32.                     <div class="main-navigation-link-text">
  33.                         <span itemprop="name">{{ name }}</span>
  34.                     </div>
  35.                 </a>
  36.             {% endif %}
  37.         {% endblock %}
  38.     {% endfor %}
  39.     {% block layout_nav_actions_account %}
  40.         <div class="account-menu cio-account-display d-flex ml-auto">
  41.             {% if cio_budgets_show %}
  42.                 {% if checkCustomerPermission('ALLOW_ADD_TO_CART', context) %}
  43.                     <div class="col-auto">
  44.                         <div class="header-budget">
  45.                             <div class="dropdown">
  46.                                 <button class="btn budget-menu-btn header-actions-btn"
  47.                                         type="button"
  48.                                         id="budgetWidget"
  49.                                         data-toggle="dropdown"
  50.                                         aria-expanded="false"
  51.                                         title="{{ 'header.btnMenuTitle' | trans }}">
  52.                                     <span class="icon"><?xml version="1.0" encoding="UTF-8"?>
  53.                                         <svg viewBox="0 0 53 53" xmlns="http://www.w3.org/2000/svg">
  54.                                             <path
  55.                                                 d="m28 14v-7.8c-0.3-4.1-7.2-6.2-14-6.2s-13.6 2.1-14 6.2v37.8c0 4.3 7 6.5 14 6.5 4.3 0 8.6-0.9 11.3-2.5 1.4 3.3 7.6 5 13.7 5 7 0 14-2.2 14-6.5v-15.3c-0.3-4.1-7.2-6.2-14-6.2-4.1 0-8.3 0.8-11 2.3v-5.8zm22 25c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3zm-25-25c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3zm-11 6.5c4.1 0 8.3-0.8 11-2.3v3.3c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3zm-11 12.7c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3v3.3c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5zm22-4.2c0 1.2-3.9 3.5-11 3.5s-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3zm-11-26c7.1 0 11 2.3 11 3.5s-3.9 3.5-11 3.5-11-2.3-11-3.5 3.9-3.5 11-3.5zm0 44.5c-7.1 0-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3v3.3c0 1.2-3.9 3.5-11 3.5zm25 2.5c-7.1 0-11-2.3-11-3.5v-3.3c2.7 1.5 6.9 2.3 11 2.3s8.3-0.8 11-2.3v3.3c0 1.2-3.9 3.5-11 3.5zm0-22c7.1 0 11 2.3 11 3.5s-3.9 3.5-11 3.5-11-2.3-11-3.5 3.9-3.5 11-3.5z"
  56.                                                 fill="currentColor"/>
  57.                                         </svg>
  58.                                     </span>
  59.                                     <span
  60.                                         class="d-none d-xl-inline-block text-left text-wrap align-middle">{{ cio_currently_selected_budget.budget.name|slice(0,10) }}
  61.                                         {% if checkCustomerPermission('ALLOW_SHOW_TOTAL_POINTS', context) %}
  62.                                             <span class="text-nowrap" style="display: none;">
  63.                                                 ({{ cio_currently_selected_budget.currentState|number_format(0, ',', '.') }} {{ 'header.currency' | trans }})
  64.                                             </span>
  65.                                         {% endif %}
  66.                                     </span>
  67.                                 </button>
  68.                                 <div
  69.                                     class="dropdown-menu dropdown-menu-right account-menu-dropdown js-account-menu-dropdown"
  70.                                     aria-labelledby="budgetWidget">
  71.                                     <div class="card">
  72.                                         <div class="list-group list-group-flush">
  73.                                             {% for budget in cio_avaivable_budgets %}
  74.                                                 <a class="list-group-item-action account-aside-item" {% if not loop.first %} style="border-top: 1px solid gray;" {% endif %}
  75.                                                    href="{{ url('storefront.account.budgets.select', {
  76.                                                        id: budget.budget.id,
  77.                                                        redirectTo: cio_avaivable_budgets_redirect,
  78.                                                        redirectToParams: cio_avaivable_budgets_redirect_params | json_encode
  79.                                                    }) }}"><span><strong>{{ budget.storeName }}</strong></span>{% if budget.storeName %} &nbsp {% endif %}
  80.                                                     <span>{{ budget.externalId }} - {{ budget.budget.name }}</span>
  81.                                                     {% if checkCustomerPermission('ALLOW_SHOW_TOTAL_POINTS', context) and checkCustomerPermission('ALLOW_ADD_TO_CART', context) %}({{ budget.currentState|number_format(0, ',', '.') }} VPP){% endif %}
  82.                                                 </a>
  83.                                             {% endfor %}
  84.                                         </div>
  85.                                     </div>
  86.                                 </div>
  87.                             </div>
  88.                         </div>
  89.                     </div>
  90.                 {% endif %}
  91.             {% endif %}
  92.             {% sw_include '@Storefront/storefront/layout/header/actions/account-widget.html.twig' %}
  93.         </div>
  94.     {% endblock %}
  95. {% endblock %}