custom/plugins/WolfPlatformGraphicMenu/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 %}
  3.     {%  set  WolfGraphicMenu =   config('WolfPlatformGraphicMenu.config')  %}
  4.     {%  set navigationMaxDepth =  WolfGraphicMenu.levels|last %}
  5.     <style>.navigation-flyout-categories.is-level-0 > .navigation-flyout-col {border-color: {{ WolfGraphicMenu.tileborder }}!important;}
  6.            .navigation-flyout-categories.is-level-0 > .navigation-flyout-col:hover {border-color: {{ WolfGraphicMenu.tileborderhover }}!important;}
  7.         {%  if WolfGraphicMenu.flyoutColorSet %}
  8.         .navigation-flyout { background-color: {{ WolfGraphicMenu.bgFlyout}};}
  9.         .navigation-flyout-link {color: {{ WolfGraphicMenu.linkFlyout }}; }
  10.         .navigation-flyout-link:hover {color: {{ WolfGraphicMenu.linkFlyoutHover }}; }
  11.         .nav-link {color: {{ WolfGraphicMenu.linkFlyout }}; } .nav-link:hover {color: {{ WolfGraphicMenu.linkFlyoutHover }}; }
  12.         {%  endif %}
  13.     </style>
  14.     {%  if page.header.navigation.active.id !="" %}{%  set activeId = page.header.navigation.active.id %}{% endif %}
  15.  {{ parent() }}
  16. {% endblock %}
  17.  {% block layout_main_navigation_menu_home %}
  18.      {%  if WolfGraphicMenu.showHome %}
  19.          {{ parent() }}
  20.      {%  endif %}
  21.  {% endblock %}
  22.  {% block layout_main_navigation_menu_item %}
  23.      {% if category.type == 'folder' %}
  24.          <div class="nav-link main-navigation-link"
  25.              {% if treeItem.children|length > 0 %}
  26.                  data-flyout-menu-trigger="{{ categorId }}"
  27.              {% endif %}
  28.               title="{{ name }}">
  29.              <div class="main-navigation-link-text">
  30.                  {%  if WolfGraphicMenu.showteaserimageTop %}
  31.                      {% sw_thumbnails 'menu--picture--main' with {
  32.                          media: treeItem.category.media,
  33.                          sizes: {
  34.                              'default': (WolfGraphicMenu.iconTopHeight ~ 'px')
  35.                          },
  36.                          attributes: {
  37.                              'class': 'menu--picture--main',
  38.                              'alt': (navigationTree.category.translated.name ?: ''),
  39.                              'title': (navigationTree.category.translated.name ?: ''),
  40.                              'data-object-fit': 'contain',
  41.                              'style': 'height: ' ~ (WolfGraphicMenu.iconTopHeight)~ 'px'
  42.                          }
  43.                      } %}
  44.                  {%  endif %}
  45.                  <span itemprop="name">{{ name }}</span>
  46.              </div>
  47.          </div>
  48.      {% else %}
  49.          <a class="nav-link main-navigation-link{% if categorId is same as(page.header.navigation.active.id) %} active{% endif %}"
  50.             href="{% if category.externalLink %}{{ category.externalLink }}{% else %}{{ seoUrl('frontend.navigation.page', { navigationId: categorId }) }}{% endif %}"
  51.             itemprop="url"
  52.              {% if treeItem.children|length > 0 %}
  53.                  data-flyout-menu-trigger="{{ categorId }}"
  54.              {% endif %}
  55.             title="{{ name }}">
  56.              <div class="main-navigation-link-text">
  57.                  {%  if WolfGraphicMenu.showteaserimageTop %}
  58.                      {% sw_thumbnails 'menu--picture--main' with {
  59.                          media: treeItem.category.media,
  60.                          sizes: {
  61.                              'default': (WolfGraphicMenu.iconTopHeight ~ 'px')
  62.                          },
  63.                          attributes: {
  64.                              'class': 'menu--picture--main',
  65.                              'alt': (navigationTree.category.translated.name ?: ''),
  66.                              'title': (navigationTree.category.translated.name ?: ''),
  67.                              'data-object-fit': 'contain',
  68.                              'style': 'height: ' ~ (WolfGraphicMenu.iconTopHeight)~ 'px'
  69.                          }
  70.                      } %}
  71.                  {%  endif %}
  72.                  <span itemprop="name">{{ name }}</span>
  73.              </div>
  74.          </a>
  75.      {% endif %}
  76.  {% endblock %}