Table of contents and cluster structure
Note
Here you'll learn how to work with the new Wiki editor. For more information about markup in the old editor, see Markup guide (old editor).
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
The Table of contents block displays a list of headings from the page.
To add a table of contents to the current or any other Wiki page:
-
On the toolbar, click
Other actions and select Table of contents.You can also use the quick access menu: type
/
and select a command from the list. -
In block settings, specify the parameters:
-
Specify the URL of the page 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.
-
-
Click Save.
To change a previously created page table of contents, in edit mode, click
in the top right corner of the block.Use this markup to add a table of contents to the page:
{% toc page="/<раздел>/<подраздел>/<имя_страницы>" 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. -
from
,to
: Heading levels to include in the table of contents, from highest to lowest. Acceptable values are fromh1
toh6
.
Cluster structure
The Cluster structure block provides a tree view of all pages in the cluster.
To add a page list for this cluster:
-
Open the toolbar in edit mode, click
Other actions, and select Cluster structure.You can also use the quick access menu: type
/
and select a command from the list. -
In block settings, specify the parameters:
- Address of the page for which you want to generate a subpage structure. Specified relative to the homepage.
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.
- Address of the page for which you want to generate a subpage structure. Specified relative to the homepage.
-
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
in the top right corner of the block.Use this markup to add the specified cluster structure to the page:
{% tree page="/<раздел>/<подраздел>" 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.depth
: Number of cluster nesting levels to display in the structure, including the current page.sort
: Sort pages:asc
: In ascending orderdesc
: In descending order
sort_by
: Sorting parameter:title
: Namecreated_at
: Creaton datemodified_at
: Modification date