From Wikibooks, the open-content textbooks collection
Many users have created navigation templates. Because many books consist of multiple modules, one must provide links between the modules.
The slash convention, if your book uses it, causes MediaWiki to generate links to parent pages in the hierarchy. However, you might want to provide other links such as "previous page" and "next page"; these templates help you do that.
[edit] Generic book navigation
| What to type |
What it makes |
Where it goes |
|
{{Simple Page Navigation|
BookName=[[Guitar]]|
CurrentPage=Harmonics|
PrevPage=[[Guitar:Tapping|Tapping]]|
NextPage=[[Guitar:Muting and Raking|Muting and Raking]]}}
|
|
Top of page |
| {{NextPrev|[[Guitar]]|[[Guitar:Tapping|Tapping]]|[[Guitar:Muting and Raking|Muting and Raking]]}} |
|
Top of page |
| {{nav|Wikibooks:Template messages}} |
|
Top of page |
| {{nav|Main page|Wikibooks:Template messages}} |
|
Top of page |
| {{Return|to=Guitar}} |
|
End of page |
[edit] Uses slash convention
Uses slash convention.
[edit] Uses colon convention (old books)
For books that use the slash convention, MediaWiki automatically generates links up the hierarchy. For older books, which do not use the slash convention, these templates are available. However new books need to use the slash convention as the naming policy states.
| What to type |
What it makes |
Where it goes |
| {{hc-navhead|Puzzles|Logic puzzles}} |
Puzzles | Logic puzzles
|
Top of page |
| {{hc-navhead|Puzzles|Logic puzzles|Knights, Knaves & Spies}} |
Puzzles | Logic puzzles | Knights, Knaves & Spies
|
Top of page |
- Works up to {{nav|page1|page2|page3|page4}} and {{hc-navhead|Book|sub1|sub2|sub3|sub4}}.
[edit] Page navigation
| What to type |
What it makes |
Where it goes |
| {{TOCleft}} |
Text that you type after the {{TOCleft}} appears here.
MediaWiki will give an automatic table of contents to each page with several sections. You write many sections (like == this == or === this ===) and MediaWiki generates the TOC.
You can use {{TOCleft}} to float the TOC left, having your book text start at the right of the TOC. You can also use __TOC__ marker to put the TOC anywhere.
|
Begin of page |
| {{toplink}} |
|
End of section or page |
[edit] A-Z contents
These templates are for pages that have alphabet sections (=== A ===, === B ===, ..., === Z ===).
[edit] Categories
| What to type |
What it makes |
Where it goes |
| {{CategoryTOC}} |
|
Top of category page |
The {{CategoryTOC}} might be useful here, but it works well at any category page, especially one with more than 200 pages in the list.
Template origin:
[edit] Shortcuts
| What to type |
What it makes |
Where it goes |
| {{Shortcut|[[WB:TM]]}} |
|
Top of Wikibooks related pages |
[edit] "prognav" templates
These templates require a specific naming convention: That is, they are for a book called "XXX Programming", "XXX" or "Programming:XXX" (checked in that order) where subpages are called "/YYY". Note the colon after Programming, and the slash after XXX. That last convention is obsolete in accordance with Project:Naming policy and is strictly for compatibility until all pages use the new naming conventions.
| What to type |
What it makes |
Where it goes |
| {{prognavstart|Perl|Getting Started}} |
|
Bottom and top of page |
| {{prognav|Perl|Strings|Numbers}} |
|
Bottom and top of page |
| {{prognavend|Perl|Getting Started}} |
|
Bottom and top of page |