<ul>
    {% for node in page_list %}
        <li {% spaceless %}{% if active_page_instance %}
            {% if active_page_instance.slug == node.slug %}class="active"
            {% else %}{% if node.slug == active_page_instance.root_slug %}class="active"{% endif %}
            {% endif %}
           {% endif %}{% endspaceless %}>
            <a href="{% url documents-page-details node.slug %}">{{ node.title }}</a>
        </li>
    {% endfor %}
</ul>
<div class="cale"></div>
