custom/plugins/GrimmTheme/src/Resources/views/storefront/layout/sidebar/category-navigation.html.twig line 1

Open in your IDE?
  1. {# we start with level 2, level 1 is never used: Einstiegskategorie #}
  2. {# navigation has 3 levels max (2-4) #}
  3. {# choose correct layout according to active result level #}
  4. {% block layout_navigation_categories %}
  5.     {% block layout_navigation_categories_list %}
  6.         {% if activeResult.level == 2 %}
  7.             {% for item in navigationTree %}
  8.                 {# found in second level: render level two template #}
  9.                 {% if item.category.id == activeResult.id %}
  10.                     {% set levelFound = true %}
  11.                     {% sw_include '@Storefront/solution360/layout/sidebar/level-two-category-navigation.html.twig' with {
  12.                         'item': item,
  13.                         'level': level
  14.                         } only 
  15.                     %}
  16.                 {% endif %}
  17.             {% endfor %}
  18.         {% elseif activeResult.level == 3 %}
  19.             {% for item in navigationTree %}
  20.                 {% if item.category.id in activeResult.path %}
  21.                     {% sw_include '@Storefront/solution360/layout/sidebar/level-three-category-navigation.html.twig' with {
  22.                     navigationTree: item.children,
  23.                     activeResult: activeResult
  24.                     } only %}
  25.                 {% endif %}
  26.             {% endfor %}
  27.         {% elseif activeResult.level == 4 %}
  28.             {% for item in navigationTree %}
  29.                 {% if item.category.id in activeResult.path %}
  30.                     {% sw_include '@Storefront/solution360/layout/sidebar/level-four-category-navigation.html.twig' with {
  31.                     navigationTree: item.children,
  32.                     activeResult: activeResult
  33.                     } only %}
  34.                 {% endif %}
  35.             {% endfor %}
  36.         {% endif %}           
  37.     {% endblock %}
  38. {% endblock %}