OpenTutorial:Template messages/Navigation
General | Cleanup | Maintenance | Deletion | Navigation | Image
User namespace | User talk | Help namespace | Project namespace
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.
What to type | What it makes | Where it goes | |||||
---|---|---|---|---|---|---|---|
{{Simple Page Navigation| TutorialName=[[Play guitar]]| |
|
Top of page | |||||
{{NextPrev|[[Play guitar]] |[[Play guitar/Tapping|Tapping]]|[[Play guitar/Muting and Raking|Muting and Raking]]}} |
|
Top of page | |||||
{{Navigation|Book=Wikibooks:Template messages|previous=Deletion|current=Navigation|next=User namespace}}
|
|
Top of page | |||||
{{plain navigation|OpenTutorial:Template messages|Deletion|User namespace}}
|
Only bottom of page | ||||||
{{Return|to=Play guitar}} | End of page |
What to type | What it makes | Where it goes | ||||||
---|---|---|---|---|---|---|---|---|
{{Navigate-First|Tutorial=OpenTutorial:Template messages|Curr=Navigation|Next=User namespace}}
|
|
Top of page | ||||||
{{Navigate|Book=Wikibooks:Template messages|Curr=Navigation|Prev=Deletion|Next=User namespace}}
|
Template:Navigate | Top of page | ||||||
{{Navigate-Last|Book=Wikibooks:Template messages|Curr=Navigation|Prev=Deletion}}
|
Template:Navigate-Last | Top of page |
What to type | What it makes | Where it goes | |
---|---|---|---|
{{TOCleft}} |
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}} | Template:Toplink | End of section or page |
A-Z contents
These templates are for pages that have alphabet sections (=== A ===, === B ===, ..., === Z ===).
What to type | What it makes | Where it goes |
---|---|---|
{{CompactTOC}} | Template:CompactTOC | Begin of page |
{{CompactTOC2}} | Template:CompactTOC2 | Begin of page |
{{CompactTOC3}} | Template:CompactTOC3 | Begin of page |
What to type | What it makes | Where it goes |
---|---|---|
{{CategoryTOC}} | Template: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:
- Commons:Template:CategoryTOC → Template:CategoryTOC 3 January 2006
Shortcuts
What to type | What it makes | Where it goes |
---|---|---|
{{Shortcut|[[WB:TM]]}} | Template:Shortcut | Top of Wikibooks related pages |
Without slash convention
For books that use the slash convention, MediaWiki automatically generates links up the hierarchy. For other books, these templates are available.
If a book does not use slash convention and is missing links up the hierarchy, consider using "nav" or "hc-navhead" templates.
What to type | What it makes | Where it goes |
---|---|---|
{{nav|Wikibooks:Template messages}} | Template:Nav | Top of page |
{{nav2|Main page|Wikibooks:Template messages}} | Template:Nav2 | Top of page |
Works up to {{nav4}}.
Also available is a set of navigation header templates tailored to books that use a colon-delimited hierarchical structure.
What to type | What it makes | Where it goes |
---|---|---|
{{hc-navhead2|Puzzles|Logic puzzles}} | Template:Hc-navhead2 | Top of page |
{{hc-navhead3|Puzzles|Logic puzzles|Knights, Knaves & Spies}} | Template:Hc-navhead3 | Top of page |
Works up to {{hc-navhead6}}.
These templates require a specific naming convention: Programming-colon-name-space-name. That is, they are for a book called "Programming:XXX" where subpages are called "Programming:XXX YYY". Note the colon after Programming, and the space after XXX.
By Project:Naming policy, that convention, and thus these templates, are obsolete. Examples of pages that use these templates are Programming:Perl and Programming:Ruby.
What to type | What it makes | Where it goes |
---|---|---|
{{prognavstart|Perl|Getting started}}
|
Bottom and top of page | |
{{prognav|Strings|Numbers}} | Bottom and top of page | |
{{prognavend|Perl|Getting started}} | Bottom and top of page |