        {% for child in level-2 %}
                    <li {% if child.is-parent %}class="parent"{% endif %}>
                        <a href="#{{ child.sectionid }}">{{ child.title }}</a>
                        {% if child.is-parent %}
                            <ul>
                                {% assign level-3 = site.entries | where: "parent-id", child.sectionid | sort: "number" %}
                                {% for grandchild in level-3 %}
                                <li>
                 