Template:Prevnext2: Difference between revisions
m Anne moved page Template:PrevNext2 to Template:Prevnext2 |
m 4 revisions imported |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<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> | |||
The old code was | |||
{{Input|1=<nowiki> | |||
<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}}}|← {{{prevtext|{{{prevpage}}}}}}]] | }}</td> | <td style="text-align: left; width: 33%">{{#if: {{{prevpage|}}} | [[{{{prevpage}}}|← {{{prevtext|{{{prevpage}}}}}}]] | }}</td> | ||
<td style="text-align: center; width: 33%">'''{{#if: {{{index|}}} | [[{{{index}}}|↑ {{{indextext|{{PAGENAME}}}}} ↑]] | {{{indextext|{{PAGENAME}}}}}}}'''</td> | <td style="text-align: center; width: 33%">'''{{#if: {{{index|}}} | [[{{{index}}}|↑ {{{indextext|{{PAGENAME}}}}} ↑]] | {{{indextext|{{PAGENAME}}}}}}}'''</td> | ||
<td style="text-align: right; width: 33%">{{#if: {{{nextpage|}}} | [[{{{nextpage}}}|{{{nexttext|{{{nextpage}}}}}} →]] | }}</td> | <td style="text-align: right; width: 33%">{{#if: {{{nextpage|}}} | [[{{{nextpage}}}|{{{nexttext|{{{nextpage}}}}}} →]] | }}</td> | ||
</tr></table></includeonly><noinclude> | </tr></table></includeonly><noinclude></nowiki>}} | ||
{{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.}} | ||
Line 12: | Line 20: | ||
== Arguments == | == Arguments == | ||
<tt><nowiki>{{ | <tt><nowiki>{{Prevnext2</nowiki><br><nowiki> | ||
| prevpage = The path of the previous article.</nowiki><br><nowiki> | | prevpage = The path of the previous article.</nowiki><br><nowiki> | ||
| prevtext = The link name for prevpage.*</nowiki><br><nowiki> | | prevtext = The link name for prevpage.*</nowiki><br><nowiki> | ||
Line 27: | Line 35: | ||
Writing this: | Writing this: | ||
<br><tt><nowiki>{{ | <br><tt><nowiki>{{Prevnext2</nowiki><br><nowiki> | ||
| prevpage=path/to/article | nextpage=path/to/article</nowiki><br><nowiki> | | prevpage=path/to/article | nextpage=path/to/article</nowiki><br><nowiki> | ||
| prevtext=previous section| nexttext=The next section</nowiki><br><nowiki> | | prevtext=previous section| nexttext=The next section</nowiki><br><nowiki> | ||
Line 34: | Line 42: | ||
Gets you this: | Gets you this: | ||
---- | ---- | ||
{{ | {{Prevnext2 | ||
| prevpage=path/to/article | nextpage=path/to/article | | prevpage=path/to/article | nextpage=path/to/article | ||
| prevtext=previous section| nexttext=The next section | | prevtext=previous section| nexttext=The next section | ||
Line 44: | Line 52: | ||
Writing this: | Writing this: | ||
<tt><nowiki>{{ | <tt><nowiki>{{Prevnext2</nowiki><br><nowiki> | ||
| nextpage=path/to/article</nowiki><br><nowiki> | | nextpage=path/to/article</nowiki><br><nowiki> | ||
| nexttext=The next section</nowiki><br><nowiki> | | nexttext=The next section</nowiki><br><nowiki> | ||
Line 51: | Line 59: | ||
Gets you this: | Gets you this: | ||
---- | ---- | ||
{{ | {{Prevnext2 | ||
| nextpage=path/to/article | | nextpage=path/to/article | ||
| nexttext=The next section | | nexttext=The next section | ||
Line 59: | Line 67: | ||
Writing this: | Writing this: | ||
<tt><nowiki>{{ | <tt><nowiki>{{Prevnext2</nowiki><br><nowiki> | ||
| prevpage=path/to/article</nowiki><br><nowiki> | | prevpage=path/to/article</nowiki><br><nowiki> | ||
| prevtext=previous section</nowiki><br><nowiki> | | prevtext=previous section</nowiki><br><nowiki> | ||
Line 66: | Line 74: | ||
Gets you this: | Gets you this: | ||
---- | ---- | ||
{{ | {{Prevnext2 | ||
| prevpage=path/to/article | | prevpage=path/to/article | ||
| prevtext=previous section | | prevtext=previous section | ||
Line 75: | Line 83: | ||
Writing this: | Writing this: | ||
<tt><nowiki>{{ | <tt><nowiki>{{Prevnext2</nowiki><br><nowiki> | ||
| nextpage=path/to/article</nowiki><br><nowiki> | | nextpage=path/to/article</nowiki><br><nowiki> | ||
| prevpage=path/to/lastsection</nowiki><br><nowiki> | | prevpage=path/to/lastsection</nowiki><br><nowiki> | ||
Line 82: | Line 90: | ||
Gets you this: | Gets you this: | ||
---- | ---- | ||
{{ | {{Prevnext2 | ||
| nextpage=path/to/article | | nextpage=path/to/article | ||
| prevpage=path/to/lastsection | | prevpage=path/to/lastsection | ||
Line 92: | Line 100: | ||
Writing this: | Writing this: | ||
<tt><nowiki>{{ | <tt><nowiki>{{Prevnext2</nowiki><br><nowiki> | ||
| prevpage=path/to/article | nextpage=path/to/article</nowiki><br><nowiki> | | prevpage=path/to/article | nextpage=path/to/article</nowiki><br><nowiki> | ||
| prevtext=previous section | nexttext=The next section</nowiki><br><nowiki> | | prevtext=previous section | nexttext=The next section</nowiki><br><nowiki> | ||
Line 100: | Line 108: | ||
Gets you this: | Gets you this: | ||
---- | ---- | ||
{{ | {{Prevnext2 | ||
| prevpage=path/to/article | nextpage=path/to/article | | prevpage=path/to/article | nextpage=path/to/article | ||
| prevtext=previous section | nexttext=The next section | | prevtext=previous section | nexttext=The next section | ||
Line 109: | Line 117: | ||
Writing this: | Writing this: | ||
<tt><nowiki>{{ | <tt><nowiki>{{Prevnext2</nowiki><br><nowiki> | ||
| nextpage=path/to/article</nowiki><br><nowiki> | | nextpage=path/to/article</nowiki><br><nowiki> | ||
| nexttext=The next section</nowiki><br><nowiki> | | nexttext=The next section</nowiki><br><nowiki> | ||
Line 117: | Line 125: | ||
Gets you this: | Gets you this: | ||
---- | ---- | ||
{{ | {{Prevnext2 | ||
| nextpage=path/to/article | | nextpage=path/to/article | ||
| nexttext=The next section | | nexttext=The next section |
Latest revision as of 12:21, 30 March 2016
The old code was
<includeonly><table align=center id=toc style="width: 95%" class="noprint"><tr> <td style="text-align: left; width: 33%">{{#if: {{{prevpage|}}} | [[{{{prevpage}}}|← {{{prevtext|{{{prevpage}}}}}}]] | }}</td> <td style="text-align: center; width: 33%">'''{{#if: {{{index|}}} | [[{{{index}}}|↑ {{{indextext|{{PAGENAME}}}}} ↑]] | {{{indextext|{{PAGENAME}}}}}}}'''</td> <td style="text-align: right; width: 33%">{{#if: {{{nextpage|}}} | [[{{{nextpage}}}|{{{nexttext|{{{nextpage}}}}}} →]] | }}</td> </tr></table></includeonly><noinclude>
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 →