Wikibooks:Template messages/Navigation

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

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

« Guitar
Harmonics
»
Tapping Muting and Raking
Top of page
{{NextPrev|[[Guitar]]|[[Guitar:Tapping|Tapping]]|[[Guitar:Muting and Raking|Muting and Raking]]}}

Previous: Tapping
Current: Template messages/Navigation
Next: Muting and Raking

Back to Guitar


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.

What to type What it makes Where it goes
{{Navigation|Book=Wikibooks:Template messages|previous=Deletion|current=Navigation|next=User namespace}}
  • adds category
← Deletion Navigation User namespace →
Top of page
{{auto navigation|User namespace|Deletion}}

Next Page: User namespace | Previous Page: Deletion

Home: Wikibooks:Template messages

Only bottom of page
{{TopNav|prev=Deletion|next=User namespace}}

← Deletion | User namespace →

Top of page
{{chapnav|Deletion|User namespace}} Deletion · User namespace
Deletion · Template messages · User namespace
Bottom of page
{{Navigate-First|Book=Wikibooks:Template messages|Curr=Navigation|Next=User namespace}}
Wikibooks:Template messages
Navigation User namespace
Top of page
{{Navigate|Book=Wikibooks:Template messages|Curr=Navigation|Prev=Deletion|Next=User namespace}}
Wikibooks:Template messages
Deletion Navigation User namespace
Top of page
{{Navigate-Last|Book=Wikibooks:Template messages|Curr=Navigation|Prev=Deletion}}
Wikibooks:Template messages
Deletion Navigation
Top of page

[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 ===).

What to type What it makes Where it goes
{{CompactTOC}}
Contents: Top - 0–9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Begin of page
{{CompactTOC2}}
Table of contents:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Begin of page
{{CompactTOC3}}
Contents

# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Begin of page

[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}}
  Index Next: Getting Started
Bottom and top of page
{{prognav|Perl|Strings|Numbers}}
Previous: Strings Index Next: Numbers
Bottom and top of page
{{prognavend|Perl|Getting Started}}
Prevoius: Getting Started Index  
Bottom and top of page
Personal tools