OpenTutorial:Template messages/Navigation

From OpenTutorial
Jump to navigation Jump to search

OldOpenTutorial:Template messages

Edit template


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.

Generic navigation

What to type What it makes Where it goes
{{Simple Page Navigation|

TutorialName=[[Play guitar]]|
CurrentPage=Harmonics|
PrevPage=[[Play guitar/Tapping|Tapping]]|
NextPage=[[Play guitar/Muting and Raking|Muting and Raking]]}}

« How to Play guitar
Harmonics
»
Tapping Muting and Raking
Top of page
{{NextPrev|[[Play guitar]]

|[[Play guitar/Tapping|Tapping]]|[[Play guitar/Muting and Raking|Muting and Raking]]}}

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

Back to Play guitar


Top of page
{{Navigation|Book=Wikibooks:Template messages|previous=Deletion|current=Navigation|next=User namespace}}
← Deletion Navigation User namespace →
Top of page
{{plain navigation|OpenTutorial:Template messages|Deletion|User namespace}}

Next Page: Deletion | Previous Page: User namespace

Home: OpenTutorial:Template messages

Only bottom of page
{{Return|to=Play guitar}} End of page

"Navigate" templates

What to type What it makes Where it goes
{{Navigate-First|Tutorial=OpenTutorial:Template messages|Curr=Navigation|Next=User namespace}}
OpenTutorial:Template messages
Navigation 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

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

Category navigation

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:

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.

"nav" 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}}.

"hc-navhead" templates

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

"prognav" templates

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}}
  • only Programming: namespace

Template:Prognavstart

Bottom and top of page
{{prognav|Strings|Numbers}}

Template:Prognav

Bottom and top of page
{{prognavend|Perl|Getting started}}

Template:Prognavend

Bottom and top of page