Template:Navlist/Contents/doc

From Wikibooks, open books for an open world
Jump to navigation Jump to search

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}}

[help] [edit] Table of Contents

Part I

Part II


{{Template:Navlist/Contents|navlist=Template:Navlist/Doc/E|Modules}}

[help] [edit] Modules

Part I

Part II


{{Template:Navlist/Contents|navlist=Template:Navlist/Doc/D|format=block|Modules}}

[help] [edit] Modules

 

Part I

Part II


{{Template:Navlist/Contents|navlist=Template:Navlist/Doc/B|format=block|background=#cccccc}}

[help] [edit]  

Alpha

Beta