<li class="navListItem">
    <a class="navItem {% if page.url == groupitem.url %} navItemActive {% endif %}" href="{{ groupitem.url | absolute_url }}">
        {{ groupitem.title }}
    </a>
    {% if groupitem.subsections %}
    <ul class="navListSubItems">
    {% for sub in groupitem.subsections %}
    <li class="navListSubItem">
    <a class="navItem" href="{{ groupitem.url | absolute_url }}#{{ sub.id }}">{{ sub.title }}</a>
    </li>
    {% endfor %}
    </ul>
    {% endif %}
</li>
