{% load sitetree %}
<ul class="nav nav-pills flex-column">
    {% for item in sitetree_items %}
        <li class="nav-item">
            <a class="nav-link {% if item.is_current or item.in_current_branch %}active{% endif %}" href="{% sitetree_url for item %}">{{ item.title_resolved }}</a>
        </li>
    {% endfor %}
</ul>