StrategyWiki:Guide/Table of contents

While the walkthrough is the heart of the guide, the Table of Contents is the veins. Every guide has one (unless it is a single-page guide), and it should usually link to all pages used in the guide to enable quick access from anywhere to anywhere else. The ToC is transcluded onto multiple pages through use of the Header Nav, Footer Nav and ToC templates.

Before any work is done on a guide, it is recommended that you complete the Table of Contents in full, which helps you organize the growth of the guide and creates an easy way to spot and create needed pages, while ensuring that the actual name of the pages is the same as what is found on the ToC. Creating a guide page first can lead to duplication of effort, as someone who doesn't see it on the ToC may also try to create it, or inconsistencies between page names and names of links that were added afterward. Having the links already on the ToC also lets you fill in the prevpage and nextpage parameters of the Footer Nav at time the page is created.

Sections
When you use the Table of Contents preload button to start a new Table of Contents page, the standard starting format is given. This include three main sections, each in their own columns: Getting Started, Walkthrough and ../Appendices/. Getting Started and Walkthrough are links to those pages while Appendices is not linked, and a single list item for a link to a Controls page is also given in the Getting Started section.

The Walkthrough page is the only linked page that is mandatory for every guide, although every guide should have at least either Getting Started or Controls linked. In the vast majority of cases, guides should have all three pages linked on the ToC. Extra sections may be added or withdrawn as needed, and the same goes for the number of columns. Don't use more than four columns in a ToC unless the links in each column are very short, as they will appear bunched up and hard to read for viewers with smaller screen resolutions.

The three main sections listed above use level 2 headings, and this level should be used for extra sections as well. To denote a sub-section of one of the main sections, use the smaller level 3 heading. Individual guide pages under each section or sub-section should be listed using bulleted lists and plain wiki links with the full page name. Use of numbered lists instead of bulleted lists is appropriate for guide pages in the walkthrough section that must be completed sequentially.

Table of Contents design can become complicated for very large guides with many pages. In this case, alternative layouts may be used, and multiple sets of columns – some nested within others – my be necessary. To understand how to produce the wanted layout, look at other, existing Tables of Contents in edit mode, or ask an administrator on their talk page for help.

Templates and formatting
For level 2 and level 3 headings, use the h2 and h3 templates, respectively. Using normal page headings (e.g. ==Heading== ) creates problems when the ToC is transcluded onto guide pages. Each template accepts the section name (linked or otherwise) as its first parameter, and "center" as its second parameter if the heading needs to be centered over multiple columns.

Unlike guide pages, only the Header Nav should be included (not the Footer Nav). In addition, the Header Nav template needs to be wrapped in tags so that it doesn't get transcluded into guide pages. It's best to just use the preload button to start with, then modify from there as this part will be already set up for you.

Due to the Table of Contents being transcluded onto multiple "levels" of a guide (meaning the main game page, sub-pages, sub-sub-pages, etc.), it's important to use fully typed out page names when creating links. This means all links should be formed as such:
 * * Page name

Note that the alternate link text (the text after the pipe) is identical to the page name. There is no reason to use different text for the link – if the alternate text is how you want a reader to identify a page, then that is the name the actual page should use as well. A possible exception is the main Walkthrough page, which can have alternate text if it makes the ToC more understandable. This is because the Walkthrough page is mandatory, whether you would normally want to use it or not.

To produce columns of text, use the col template. Multiple iterations of this template, including using the template within other instances of the template can become quite complicated, so begin with the larger, outer layout and work inwards as needed. You'll know right away if you're having a problem, as you'll usually see things that belong on the sides of the page floating in the center when you preview your changes. In most cases you'll just need to add a starting or ending Col template somewhere.

For very long guides, the tochide template is available to make the ToC more readable. The template produces a collapsible element which hides anything inside until a user clicks to show the contents. The templates are automatically expanded on Table of Contents pages and the main Walkthrough page of a guide. Unless there are an extraordinarily large amount of walkthrough pages, this template is mainly for hiding extra information a user is less likely to need, such as bonus missions, item pages, etc.