{% macro toc_loop(items) %} {% for item in items %} {% set class = loop.first ? 'first' : loop.last ? 'last' : null %}
  • {{ item.label | raw }} {% if item.children|length > 0 %} {% endif %}
  • {% endfor %} {% endmacro %} {% if active or toc_config_var('active') %}
    {% set table_of_contents = toc_items(page.content) %} {% if table_of_contents is not empty %}

    {{ 'PLUGIN_PAGE_TOC.TABLE_OF_CONTENTS'|t }}

    {% endif %}
    {% endif %}