vendor/shopware/storefront/Resources/views/storefront/layout/navigation/offcanvas/item-link.html.twig line 1

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