custom/plugins/IabTheme/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 %}
  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.             {% set mainNavigation = children.tree|filter(n => n.category.name == 'Main Navigation')|first %}
  10.             {% if mainNavigation %}
  11.                 <ul class="list-unstyled navigation-offcanvas-list">
  12.                     {% for item in mainNavigation.children|sort((a, b) =>
  13.                             a.category.translated.customFields.migration_shopware5_category_nav_col
  14.                             <=> b.category.translated.customFields.migration_shopware5_category_nav_col) %}
  15.                         {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/collapse-menu.html.twig'
  16.                             with { item: item } only %}
  17.                     {% endfor %}
  18.                 </ul>
  19.             {% endif %}
  20.         </div>
  21.     </div>
  22. {% endblock %}