{% load category_tags %} {% if categories %} {% for category in categories %} {% if category.icon %} {% endif %} {{ category.name }} {% get_category_children category as children %} {% if children %} {% for child in children %} {% if child.icon %} {% endif %} {{ child.name }} {% endfor %} {% endif %} {% endfor %} {% endif %}