custom/plugins/KayloBasicTheme/src/Resources/views/storefront/layout/navigation/offcanvas/categories.html.twig line 1

Open in your IDE?
  1. {# @var navigation \Shopware\Core\Content\Category\Tree\Tree #}
  2. {% set activeId = navigation.active.id ?? context.salesChannel.navigationCategoryId %}
  3. {% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
  4. {% set children = navigation.children(activeId) %}
  5. {% set active = navigation.active %}
  6. {% block layout_navigation_offcanvas_navigation_categories %}
  7.     <div class="navigation-offcanvas-container js-navigation-offcanvas">
  8.         <div class="navigation-offcanvas-overlay-content js-navigation-offcanvas-overlay-content">
  9.             {% if not isRoot %}
  10.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-all-link.html.twig' %}
  11.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/active-item-link.html.twig' with { item: active } %}
  12.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/back-link.html.twig' with { item: active } %}
  13.             {% else %}
  14.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/general-headline.html.twig' %}
  15.             {% endif %}
  16.             <ul class="list-unstyled navigation-offcanvas-list">
  17.                 {% if not isRoot and page.navigation.active.type != "folder" %}
  18.                     {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-active-link.html.twig' with { item: active } %}
  19.                 {% endif %}
  20.                 {# @var item \Shopware\Core\Content\Category\Tree\TreeItem #}
  21.                 {% for item in children.tree %}
  22.                     {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/item-link.html.twig' with { item: item, activeId: activeId } %}
  23.                 {% endfor %}
  24.             </ul>
  25.         </div>
  26.     </div>
  27. {% endblock %}