Template:Navlist/Contents/doc
Appearance
This is a documentation subpage for Template:Navlist/Contents It may contain usage information, categories and other content that is not part of the original template page. |
This template employs intricate features of template syntax. You are encouraged to familiarize yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly. Remember that you can conduct experiments, and should test all improvements, in either the general template sandbox or your user space before changing anything here. |
Usage
[edit source]This template generates a table of contents for a book, derived from a navlist page; see Template:Navlist/Doc.
- Optional unnamed parameter {{{1}}} specifies the name for the section heading; the default section heading is "Table of Contents". If parameter {{{1}}} has value #nosection, no section heading is generated.
- Optional named parameter {{{navlist}}} specifies the navlist page; the default navlist page is Template:{{BOOKNAME}}/Navlist. When a parameter value is provided, the navlist page is assumed to be in mainspace unless another namespace is specified in the parameter value.
- Optional named parameter {{{format}}} specifies how the table of contents is presented. The default format is a simple list. Specifying format=block causes the contents to be presented as a two-column table, with each section heading on the left and its contents to its right.
- Optional named parameter {{{background}}} is ignored unless format=block. It specifies the background color with which to shade the cells of the table; default background color is determined by the {{{background}}} parameter in the navlist (see here).
Examples (see note on editing):
- {{Template:Navlist/Contents|navlist=Template:Navlist/Doc/D}}
Table of Contents
Part I
Part II
- {{Template:Navlist/Contents|navlist=Template:Navlist/Doc/E|Modules}}
Modules
Part I
Part II
- {{Template:Navlist/Contents|navlist=Template:Navlist/Doc/D|format=block|Modules}}
Modules
|
|
Part I |
|
Part II |
- {{Template:Navlist/Contents|navlist=Template:Navlist/Doc/B|format=block|background=#cccccc}}
Alpha |
|
Beta |