---
metadata:
  - name: generator
    content: Diplodoc Platform v5.46.1
alternate:
  - https://yandex.com.tr/support/wiki/en/wysiwyg/toc-structure.md
title: "Table of contents and cluster structure in Yandex\_Wiki"
description: This guide will show you how to add a table of contents or a cluster structure to your Wiki pages.
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/support/wiki/en/llms.txt


# Table of contents and cluster structure

For easy navigation through Wiki pages and clusters, you can add a table of contents and a cluster structure (a list of subpages) to the page.

## Page's table of contents {#toc}

The **Table of contents** block displays a list of [headings](https://yandex.com.tr/support/wiki/en/wysiwyg/text-format.md#headers) from the page.

{% list tabs group=editor %}

- Visual editor

    To add a table of contents to the current or any other Wiki page:

    1. On the toolbar, click <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" aria-hidden="true" class="yc-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M14 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 14 6.125zm-5.906 0a1.874 1.874 0 1 1 0 3.749 1.874 1.874 0 0 1 0-3.749zM2 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 2 6.125z"/></svg></svg> **Other actions** and select <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" aria-hidden="true" class="yc-icon ye-command-menu__item-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M15 3.25a.75.75 0 0 0-.75-.75H1.75a.75.75 0 0 0 0 1.5h12.5a.75.75 0 0 0 .75-.75ZM15 8a.75.75 0 0 0-.75-.75h-8.5a.75.75 0 0 0 0 1.5h8.5A.75.75 0 0 0 15 8Zm-.75 4a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1 0-1.5h2.5Z" clip-rule="evenodd"/></svg></svg> **Table of contents**.

        <!-- source: en/yfmeditor/tools-tip.md -->
        You can also use the quick access menu: type `/` and select a command from the list. {#slash}
        <!-- endsource: en/yfmeditor/tools-tip.md -->

    1. In block settings, specify the parameters:

        * Specify the [URL of the page](https://yandex.com.tr/support/wiki/en/structure.md#relative) for which you want to generate a table of contents in the following format: `/<cluster>/<subcluster>/<page_name>`. For example: `/users/username/my-page/`.

           If you don't specify an address, the table of contents will be added to the current page.

        * In the **From** and **To** fields, specify the maximum and minimum heading levels to include in the table of contents.

           If you leave the `—` value, the table of contents will include heading levels from 1 to 6.

    1. Click **Save**.

    To change a previously created page table of contents, in edit mode, click <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" aria-hidden="true" class="yc-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M14 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 14 6.125zm-5.906 0a1.874 1.874 0 1 1 0 3.749 1.874 1.874 0 0 1 0-3.749zM2 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 2 6.125z"/></svg></svg> in the top right corner of the block.

- Markdown markup

    Use this markup to add a table of contents to the page:

    ```
    {% toc page="/<cluster>/<subcluster>/<page_name>" from="h1" to="h6" %}
    ```

    For example: `{% toc page="/users/username/my-page" from="h1" to="h6" %}`.

    Markup parameters:

    * `page`: Address of the page for which you want to generate a table of contents. Specified [relative to the homepage](https://yandex.com.tr/support/wiki/en/structure.md#relative).

    * `from`, `to`: Heading levels to include in the table of contents, from highest to lowest. Acceptable values are from `h1` to `h6`.

{% endlist %}


## Cluster structure {#tree}

The **Cluster structure** block provides a tree view of all pages in the cluster.

{% list tabs group=editor %}

- New editor

    To add a page list for this cluster:

    1. Open the toolbar in edit mode, click <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" aria-hidden="true" class="yc-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M14 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 14 6.125zm-5.906 0a1.874 1.874 0 1 1 0 3.749 1.874 1.874 0 0 1 0-3.749zM2 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 2 6.125z"/></svg></svg> **Other actions**, and select **Cluster structure**.

       <!-- source: en/yfmeditor/tools-tip.md -->
       You can also use the quick access menu: type `/` and select a command from the list. {#slash}
       <!-- endsource: en/yfmeditor/tools-tip.md -->

   1. In block settings, specify the parameters:

        * **Address of the page** for which you want to generate a subpage structure. Specified [relative to the homepage](https://yandex.com.tr/support/wiki/en/structure.md#relative).
           If you don't specify an address, the structure will be generated for the current page.
        * **Depth**: Number of cluster nesting levels to display in the structure, including the current page.
        * **Sort by**: Name, date created, or date updated.
        * **Sorting order**: Ascending or descending.

    1. Click **Save**.

    A section with the cluster structure will appear on the page. To edit or delete a previously created cluster structure, in edit mode, click<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" aria-hidden="true" class="yc-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M14 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 14 6.125zm-5.906 0a1.874 1.874 0 1 1 0 3.749 1.874 1.874 0 0 1 0-3.749zM2 6.125a1.874 1.874 0 1 1 .001 3.749A1.874 1.874 0 0 1 2 6.125z"/></svg></svg> in the top right corner of the block.

- Markdown markup

    Use this markup to add the specified cluster structure to the page:

    ```
    {% tree page="/<cluster>/<subcluster>" depth="5" sort="asc" sort_by="title" %}
    ```

    For example: `{% tree page="/users/username depth="5" sort="asc" sort_by="title" %}`.

    Parameters:

    * `page`: Address of the page for which you want to generate a subpage structure. Specified [relative to the homepage](https://yandex.com.tr/support/wiki/en/structure.md#relative).
    * `depth`: Number of cluster nesting levels to display in the structure, including the current page.
    * `sort`: Sort pages:
       - `asc`: In ascending order
       - `desc`: In descending order
    * `sort_by`: Sorting parameter:
      - `title`: Name
      - `created_at`: Creaton date
      - `modified_at`: Modification date

{% endlist %}
