<div class="toc">
<dl class="toc">
{% for toc_item in toc %}
    {% if toc_item.children %}
        <dt><span class="section"><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></span></dt>
        <dd><dl>
            {% for toc_item in toc_item.children %}
                <dt><span class="section"><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></span></dt>
            {% endfor %}
        </dl></dd>
    {% else %}
        <dt><span class="section"><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></span></dt>
    {% endif %}
{% endfor %}
</dl>
</div>
