Template:Nav
Usage
[edit source]This template provides navigation links to the previous, next, and root pages of the book automatically from the table of contents thanks to Module:Printable version. This makes reordering a book significantly easier; simply rearrange the links in the book's table of contents, without the painstaking process of editing navigation links on all affected or adjacent pages. {{BookCat}} is automatically included as well (unless nocat is set), further reducing copy-and-paste boilerplate.
The table of contents is usually the root page of the book. If the /TOC subpage exists, or the TOC/1 parameter is set, that page is used instead. It is recommended to call this template as just {{Nav}} with no parameters, unless you intentionally want to create an example of this template being used on a book or page different than the current one.
Examples
[edit source]- {{Nav}} on Python Programming/Lists gives:
- {{Nav}} on PHP Programming/The if Structure gives:
TemplateData
[edit source]TemplateData for Nav
Pages navigation links
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Table of contents | 1 TOC | Name of a page that links to every page in this book; if unset, the book's /TOC subpage (if existent) or root page will be used | String | optional |
| Current page name | 2 page | Current page name | String | optional |
| Don't autocategorize | nocat | If set, don't automatically categorize this article based on its hierarchy in the book | Boolean | optional |