Template:Prevnext2: Difference between revisions

From KDE Wiki Sandbox
Line 66: Line 66:
----
----


== Omitting link descriptions ==
== Example usage: the least amount of typing ==
 
Writing this:
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,
 
<code>{{Prevnext2
<code>{{Prevnext2
| nextpage=path/to/article
| nextpage=path/to/article
| prevpage=path/to/lastsection
| prevpage=path/to/lastsection
}}</code>
}}</code>
 
Gets you this:
will render as:
----
----
{{Prevnext2
{{Prevnext2
Line 82: Line 79:
}}
}}
----
----
This might be useful in some situations. But often it looks ugly, so try to specify link text whenever you can!


== Extra options ==
== Extra options ==

Revision as of 14:50, 3 June 2010

Template:I18n/Language Navigation Bar

Information
This template is a work-in-progress and will probably be re-named to something less obtuse quite soon, so avoid using it just at the moment.


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.


Arguments

← The link name for prevpage.* ↑ The link name for index.* ↑ The link name for nextpage.*→

(* - Optional arguments.)

Example usage

Writing this:

← previous section Prevnext2 The next section→

Gets you this:


← previous section Prevnext2 The next section→

Example usage: omitting arguments

Writing this:

Prevnext2 The next section→

Gets you this:


Prevnext2 The next section→

Writing this:

← previous section Prevnext2

Gets you this:


← previous section Prevnext2

Example usage: the least amount of typing

Writing this:

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

Gets you this:


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

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

which will be rendered as:


← previous section ↑ Contents page ↑ The next section→

You don't need to use both of them. If you just want to specify the text in the middle without making it a link, simply omit the index argument completely:

Contents section The next section→

Which will be rendered as:


Contents section The next section→

Template source code

Prevnext2