Guide to the Table of Contents
World Table of Contents
Paste the code [toc] anywhere to display the full table of contents for your world. The result of this tag is what you already have in the world main page under the World Codex section. For the World Anvil Codex world, it looks like this:
Tip: this is an interactive list! Click on the categories to expand.
Category Table of Contents
If you want to use it, please consider supporting World Anvil!
To get the category index tag, you have to access the advanced edit page for the category you want to display. Simply go to the Articles & Categories Manager from your sidebar, click on a category, and then click Advanced Edit at the bottom of the right panel.
In the category edit page, you will see a panel in the right side of the screen: Category presentation snippets. Uncollapse it and copy the category table of contents widget tag, which should look something like [toc:ID] (where ID is a set of numbers and characters).
Additionally, you can make the table of contents display in horizontal format by adding a "horizontal" parameter: [toc:ID|horizontal]
Article Table of Contents
To add a table of contents to your article, just add the [articletoc] tag somewhere within the article. The tag will scan the article and create a list of the artice's headers, with a structure based on header importance (first-level headers, second-level headers, etc.).
Please note that this tag may not work if the article already contains the world table of contents, a category table of contents, an organization tree, or character or organization relationship blocks.