custom/plugins/EmovaWbTheme/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.getChildren(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.             <div class="navigation-offcanvas-top" style="display:flex">
  11.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-all-link.html.twig' %}
  12.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/active-item-link.html.twig' with { item: active } %}
  13.                 {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/back-link.html.twig' with { item: active } %}
  14.             </div>
  15.             {% else %}
  16.                 {# {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/general-headline.html.twig' %} #}
  17.             {% endif %}
  18.             <ul class="list-unstyled navigation-offcanvas-list offcanvas-custom-menu-ul">                
  19.                 {% for item in children.tree %}
  20.                     {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/item-link.html.twig' with { item: item, activeId: activeId } %}
  21.                 {% endfor %}
  22.                 <div class="navigation-offcanvas-top">
  23.                 
  24.                     {% if not isRoot and page.navigation.active.type != "folder" %}
  25.                         {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-active-link.html.twig' with { item: active } %}                       
  26.                     {% endif %}
  27.                 </div>
  28.                 <div class="navigation-offcanvas-top-big">
  29.                 
  30.                     {% if not isRoot and page.navigation.active.type != "folder" %}
  31.                         {% for item in page.header.navigation.tree %}
  32.                             {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/item-link.html.twig' with { item: item, activeId: active.Id, parentId: active.parentId } %}
  33.                         {% endfor %}
  34.                     {% endif %}
  35.                 </div>
  36.             </ul>
  37.         </div>
  38.        
  39.     </div>    
  40. {% endblock %}