Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add with block

dominik-zeglend9717a93a46c
diff --git a/templates/category/filters.html b/templates/category/filters.html
index 40a3de5055..ae12b94211 100644
--- a/templates/category/filters.html
+++ b/templates/category/filters.html
@@ -1,15 +1,17 @@
{% extends "product/_filters.html" %}
{% block title_tree %}
- {% if category.get_children %}
- <div class="product-filters__categories">
- <ul class="product-filters__categories__childs no-parent">
- {% for child in category.get_children %}
- <li>
- <a href="{{ child.get_absolute_url }}">{{ child.name }}</a>
- </li>
- {% endfor %}
- </ul>
- </div>
- {% endif %}
+ {% with children=category.get_children %}
+ {% if children %}
+ <div class="product-filters__categories">
+ <ul class="product-filters__categories__childs no-parent">
+ {% for child in children %}
+ <li>
+ <a href="{{ child.get_absolute_url }}">{{ child.name }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+ {% endwith %}
{% endblock title_tree %}