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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/sidebar/category-navigation.html.twig' %}
  2. {% block layout_navigation_categories %}
  3.     {% set navigationMaxDepth = 2 %}
  4.      {% if not level %}
  5.         {% set level = 0 %}
  6.     {% endif %}
  7.     {% block layout_navigation_categories_list %}
  8.         
  9.         <ul class="category-navigation level-{{ level }}">
  10.             {% for item in navigationTree %}
  11.                 {% block layout_navigation_categories_list_entry %}
  12.                     <li class="category-navigation-entry">
  13.                         {% if (item.category.id in activeResult.id) or (item.category.id in activeResult.path) %}
  14.                             {% block layout_navigation_categories_link_children %}
  15.                                 <a class="category-navigation-link{% if item.category.id is same as(activeResult.id) %} is-active{% endif %}{% if item.category.id in activeResult.path %} in-path{% endif %}"
  16.                                    href="{{ category_url(item.category) }}"
  17.                                    {% if category_linknewtab(item.category) %}target="_blank"{% endif %}>
  18.                                     {% block layout_navigation_categories_link_children_name %}
  19.                                         {{ item.category.translated.name }}
  20.                                         
  21.                                     {% endblock %}
  22.                                 </a>
  23.                             {% endblock %}
  24.                             {% block layout_navigation_categories_recoursion %}
  25.                                 {% if level < navigationMaxDepth %}
  26.                                     {% sw_include '@Storefront/storefront/layout/sidebar/category-navigation.html.twig' with {
  27.                                         navigationTree: item.children,
  28.                                         activeResult: activeResult,
  29.                                         level: level + 1
  30.                                     } %}
  31.                                 {% endif %}
  32.                             {% endblock %}
  33.                         {% else %}
  34.                             {% block layout_navigation_categories_link %}
  35.                                 <a class="category-navigation-link{% if item.category.id is same as(activeResult.id) %} is-active{% endif %}"
  36.                                    href="{{ category_url(item.category) }}"
  37.                                    {% if category_linknewtab(item.category) %}target="_blank"{% endif %}>
  38.                                     {% block layout_navigation_categories_link_name %}
  39.                                         {{ item.category.translated.name }}
  40.                                     {% endblock %}
  41.                                 </a>
  42.                             {% endblock %}
  43.                         {% endif %}
  44.                     </li>
  45.                 {% endblock %}
  46.             {% endfor %}
  47.         </ul>
  48.     {% endblock %}
  49. {% endblock %}