{% load i18n %}
{% load lfs_tags %}

{% if categories %}
    <div class="categories-portlet portlet">
        <div class="portlet-header">
            {{ title }}
        </div>
        <div class="portlet-body">
            <ul class="root">
                {% for category in categories %}
                    <li class="level-{{ category.level }}">
                        <a {% if category.is_current %}class="current"{% endif %}
                           href="{{ category.category.get_absolute_url }}">
                            {{ category.category.name }}
                        </a>
                        {% category_children category.children %}
                    </li>
                {% endfor %}
            </ul>
        </div>
    </div>
{% endif %}