src/Storefront/Resources/views/storefront/layout/navigation/offcanvas/item-link.html.twig line 1

  1. {% set isActive = item.category.id == activeId %}
  2. {% set hasChildren = item.category.visibleChildCount > 0 %}
  3. {% set url = category_url(item.category) %}
  4. {% set name = item.category.translated.name %}
  5. <li class="navigation-offcanvas-list-item">
  6.     {% block layout_navigation_offcanvas_navigation_categories_list_category_item_link %}
  7.         <a class="navigation-offcanvas-link nav-item nav-link{% if isActive %} active{% endif %}{% if hasChildren %} js-navigation-offcanvas-link{% endif %}"
  8.            href="{{ url }}"
  9.             {% if hasChildren %}
  10.                 data-href="{{ path('frontend.menu.offcanvas', {'navigationId': item.category.id}) }}"
  11.             {% endif %}
  12.            itemprop="url"
  13.             {% if category_linknewtab(item.category) %}target="_blank"{% endif %}
  14.            title="{{ name }}">
  15.             {% block layout_navigation_offcanvas_navigation_categories_list_category_item_link_text %}
  16.                 <span itemprop="name">{{ name }}</span>
  17.                 {% if hasChildren %}
  18.                     {% block layout_navigation_offcanvas_navigation_categories_list_category_item_link_icon %}
  19.                         <span
  20.                             class="navigation-offcanvas-link-icon js-navigation-offcanvas-loading-icon">
  21.                             {% sw_icon 'arrow-medium-right' style { 'pack':'solid', 'size': 'sm' } %}
  22.                         </span>
  23.                     {% endblock %}
  24.                 {% endif %}
  25.             {% endblock %}
  26.         </a>
  27.     {% endblock %}
  28. </li>