How to create an automatic table of contents

You can automatically create a table of contents for the page based on its headings. To do this:

  1. Make sure the headings on the page are marked correctly.

  2. Create a table of contents using the dynamic block:

    {{toc}}

By default, the table of contents will contain all the headings on the page. You can use additional parameters to configure the table of contents:

  • page – The address of the page that will supply headings to create the table of contents.

  • fromThe highest heading level to include in the table of contents.

  • toThe lowest heading level to include in the table of contents.

  • numerate – When this option is enabled, headings are numbered in the table of contents.

  • titleTitle of the table of contents.

Example of a numbered table of contents for the page /example. The table of contents will contain headings from the first (h1) to the third (h3) level.

{{toc page="/example" numerate="1" from="h1" to="h3"}}