Template:Prevnext2: Difference between revisions
m Anne moved page Template:PrevNext2 to Template:Prevnext2 |
Neverendingo (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>< | <includeonly><ul class="pager"> | ||
< | <li>{{#if: {{{prevpage|}}} | [[{{{prevpage}}}|← {{{prevtext|{{{prevpage}}}}}}]] | }}</li> | ||
< | <li>'''{{#if: {{{index|}}} | [[{{{index}}}|↑ {{{indextext|{{PAGENAME}}}}} ↑]] | {{{indextext|{{PAGENAME}}}}}}}'''</li> | ||
< | <li>{{#if: {{{nextpage|}}} | [[{{{nextpage}}}|{{{nexttext|{{{nextpage}}}}}} →]] | }}</li> | ||
</ | </ul></includeonly><noinclude> | ||
{{Info|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.}} | {{Info|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.}} |
Revision as of 18:30, 30 July 2012
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
{{PrevNext2
| prevpage = The path of the previous article.
| prevtext = The link name for prevpage.*
| nextpage = The path to the next article.*
| nexttext = The link name for nextpage.*
| index = The path to the manual index.*
| indextext = The link name for index.*
}}
(* - Optional arguments.)
Example usage
Writing this:
{{PrevNext2
| prevpage=path/to/article | nextpage=path/to/article
| prevtext=previous section| nexttext=The next section
}}
Gets you this:
- ← previous section
- Prevnext2
- The next section →
Example usage: omitting arguments
Writing this:
{{PrevNext2
| nextpage=path/to/article
| nexttext=The next section
}}
Gets you this:
- Prevnext2
- The next section →
Writing this:
{{PrevNext2
| prevpage=path/to/article
| prevtext=previous section
}}
Gets you this:
- ← previous section
- Prevnext2
Example usage: the least amount of typing
Writing this:
{{PrevNext2
| nextpage=path/to/article
| prevpage=path/to/lastsection
}}
Gets you this:
- ← path/to/lastsection
- Prevnext2
- path/to/article →
Example usage: including every argument
Writing this:
{{PrevNext2
| prevpage=path/to/article | nextpage=path/to/article
| prevtext=previous section | nexttext=The next section
| index= {{PAGENAME}}/Manual | indextext=Contents page
}}
Gets you this:
Writing this:
{{PrevNext2
| nextpage=path/to/article
| nexttext=The next section
| indextext=Contents section
}}
Gets you this:
- Contents section
- The next section →