Template:Prevnext2: Difference between revisions

From KDE UserBase Wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><table align=center id=toc style="width: 95%" class="noprint"><tr>
<includeonly><table align=center id=toc style="width: 95%" class="noprint"><tr>
<td style="text-align: left; width: 33%">{{#if: {{{prevpage|}}} | [[{{{prevpage}}}|&larr; {{{prevtext|{{{prevpage}}}}}}]] | }}</td>
<td style="text-align: left; width: 33%">{{#if: {{{prevpage|}}} | [[{{{prevpage}}}|&larr; {{{prevtext|{{{prevpage}}}}}}]] | }}</td>
<td style="text-align: center; width:  33%">'''{{#if: {{{index|}}} | [[{{{index}}}|&larr; {{{indextext|{{PAGENAME}}}}}]] | {{PAGENAME}}}}'''</td>
<td style="text-align: center; width:  33%">'''{{#if: {{{index|}}} | [[{{{index}}}|&uarr; {{{indextext|{{PAGENAME}}}}} &uarr;]] | {{PAGENAME}}}}'''</td>
<td style="text-align: right; width: 33%">{{#if: {{{nextpage|}}} | [[{{{nextpage}}}|{{{nexttext|{{{nextpage}}}}}}&rarr;]] | }}</td>
<td style="text-align: right; width: 33%">{{#if: {{{nextpage|}}} | [[{{{nextpage}}}|{{{nexttext|{{{nextpage}}}}}}&rarr;]] | }}</td>
</tr></table></includeonly><noinclude>{{Template:I18n/Language Navigation Bar|Template:Prevnext}}
</tr></table></includeonly><noinclude>{{Template:I18n/Language Navigation Bar|Template:Prevnext}}

Revision as of 04:40, 3 June 2010

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

← previous section Prevnext2 The next section→

which will be returned as,


← previous section Prevnext2 The next section→

Optional arguments

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 The next section→

Which would be rendered as:


Prevnext2 The next section→

This works the other way around, too. This:

← previous section Prevnext2

is rendered as:


← previous section Prevnext2

Omitting link descriptions

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,

← path/to/lastsection Prevnext2 path/to/article→

will render as:


← path/to/lastsection Prevnext2 path/to/article→

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

Extra options

There are two more completely optional arguments for this template. These replace the text in the middle of the template with a link to wherever you like (most usually the index of the article). To use them, write this:

← previous section ↑ Go to the contents page ↑ The next section→

which will be rendered as:


← previous section ↑ Go to the contents page ↑ The next section→


Template source code

Prevnext2