Template:Prevnext2

From KDE Wiki Sandbox
Revision as of 04:13, 3 June 2010 by Xiyizi (talk | contribs)


Template:I18n/Language Navigation Bar

Use this template when you want to provide links to the previous and the next sections of the article so the user isn't forced to go back to the index to navigate.

How to use this template

Write

{{Prevnext2
| prevpage=path/to/article | nextpage=path/to/article
| prevtext=previous section| nexttext=The next section
}}

which will be returned as,

← previous section Prevnext2 The next section→


Additionally, the arguments in this template are optional. That is, if there is no previous page to link to, you don't have to include it in the template. You can just write this:

{{Prevnext2
| nextpage=path/to/article
| nexttext=The next section
}}

Which would be rendered as:

Prevnext2 The next section→


This works the other way around, too. This:

{{Prevnext2
| prevpage=path/to/article
| prevtext=previous section
}}

is rendered as:

← previous section Prevnext2


Finally, the link description text doesn't have to be specified, either. The text will default to the name of the article you are linking to. So, the following syntax,

{{Prevnext2
| nextpage=path/to/article
| prevpage=path/to/lastsection
}}

will render as:

← prevpage Prevnext2 nextpage→


This might be useful in some situations. But often it looks ugly, so try to specify link text whenever you can!