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. Possible exceptions are for the main Walkthrough page, which can have alternate text if it makes the ToC more understandable, or to hide extra disambiguation in a page's title. As a general rule, only use page links on the ToC, not links to sections on pages, as they create unnecessary navigation problems.

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.

Sharing ToCs
In some cases, multiple guides share a great deal of content, and it saves time and reduces duplication of effort to allow those guides to share the pages they have in common. In some cases you should let the parent guide's ToC contain all the links, such as for ports that only need a different main game page. In other cases, when there are multiple pages of content that don't apply to the parent guide, you can split the sub-pages between the parent and the child guides. In either case, sharing tables of contents is possible through transclusion of one main ToC, which holds all the links and is the only page that needs to be updated.

To transclude another guide's table of contents, simply add   directly after the tag following the Header Nav. It is important that you put the transclusion on the same line as the Header Nav to avoid creating odd looking whitespace when the ToC is transcluded into guide pages.

In the case of maintaining some pages on the child guide, you can use the subtoc and subtoc2 templates to visually separate links to them in the table of contents. On the parent guide's ToC (the one being transcluded into the child guide's ToC), below the shared content, just add Child guide name followed by links to the child guide's sub-pages. When adding multiple child guides to the ToC, put Child guide name after the previous child guide's content and before starting the new one's. Whether you are adding a single child guide or multiple ones, at the very bottom of all such content, add a simple subtoc2 with no parameter at the bottom to signify the end of the child guide content.

After a parent guide's ToC has been set up, any further changes to either the parent or child ToCs can be made on the parent's.

Common layouts
These layouts are the ones most often used and should give you an idea if you find the standard layout isn't quite meeting your needs. In general, start with the normal layout, then try other ones, usually as the amount of walkthrough pages gets longer. One thing you should strive for is the "flattest" presentation possible, meaning columns of nearly equal length and no lopsidedness.

For times when there are too many non-walkthrough pages to nicely fit under the Getting Started or Appendices section, consider breaking them into multiple columns in either an area before or after the walkthrough. If the information belongs in the Getting Started section, put it before the Walkthrough section, and if it belongs in the Appendices section, put it after the Walkthrough section.

🇨🇴 🇨🇴

🇨🇴
 * Page name
 * Page name
 * Page name

🇨🇴
 * Page name
 * Page name
 * Page name

🇨🇴 🇨🇴 🇨🇴
 * Page name
 * Page name
 * Page name

🇨🇴
 * Page name
 * Page name
 * Page name

🇨🇴 🇨🇴 🇨🇴 🇨🇴
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name

🇨🇴 🇨🇴
 * Page name
 * Page name
 * Page name

🇨🇴 🇨🇴


 * Page name
 * Page name

🇨🇴
 * Page name
 * Page name

🇨🇴 🇨🇴 🇨🇴 🇨🇴 🇨🇴 🇨🇴
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name

🇨🇴
 * Page name
 * Page name

🇨🇴
 * Page name
 * Page name

🇨🇴 🇨🇴 🇨🇴 🇨🇴 🇨🇴 🇨🇴
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name
 * Page name

Fighting games
Fighting games have a special formatting for both the table of contents and the individual sub-pages of the guide. Because there are multiple places where a character's move list may want to be seen (i.e. the character's page and the game's move list page), special unlinked pages are made which can be transcluded wherever necessary. In addition to character moves, many fighting games are series which share a good number of characters throughout each game. For this reason, long-running fighting series usually use one table of contents for all games, with an ever-expanding list of characters. This is the normal layout for a fighting game table of contents:

In this case, "How to play" is the Walkthrough page with alternate text and the individual character pages are located at Game name/Characters/Character name. The pages at Game name/Character name are created, then transcluded into both the individual Characters/Character name pages and the Moves pages. The links under the How to play section are links to each game in the series' main game page. Note that there are no Getting Started or Controls pages. Due to this, the Continue Nav on the main guide pages need to be updated with nextpage, nextname and nextpage2 parameters going to the correct pages (usually the Walkthrough page and the Moves page). For later games in the series, redirect the Walkthrough page to the main guide's Walkthrough page so the links in the Continue Nav and Header Navs go where intended.

Because of the table of content's set up, it is often hard to make workable Footer Nav links. This is a known issue, which is currently unresolved. In cases where the links before and after a page are on the same guide, you can use that guide's name in the game</tt> parameter of the footer nav, even if the current page isn't on that guide. For help in setting up or otherwise working on fighting games, you can look through Category:Fighting for examples, or ask on the staff lounge for assistance.