Here's a simple code snippet that uses the awesome macro feature in Twig, it's also Bootstrap friendly. Enjoy!
{% macro loop(page, parent_url) %}
{% for p in page.children %}
{% if p.visible %}
{% set active_class = (p.active or p.activeChild and (parent_url != p.url)) ? ' active' : '' %}
{% if p.parent().url == parent_url or p.url == parent_url %}
<a class="list-group-item{{ active_class }}" href="{{ p.url }}">{{ p.menu }}</a>
{% endif %}
{{ _self.loop(p,parent_url) }}
{% endif %}
{% endfor %}
{% endmacro %}
<div class="list-group">
{{ _self.loop(pages, page.parent().url) }}
</div>
---