Difference between revisions of "Template:Prevnext2"

Jump to: navigation, search
(Undo revision 258206 by Claus chr (talk))
m (Anne moved page Template:PrevNext2 to Template:Prevnext2)
Line 1: Line 1:
<includeonly><ul class="pager">
 
<li>{{#if: {{{prevpage|}}} | [[{{{prevpage}}}|&larr; {{{prevtext|{{{prevpage}}}}}}]] | }}</li>
 
<li>'''{{#if: {{{index|}}} | [[{{{index}}}|&uarr; {{{indextext|{{PAGENAME}}}}} &uarr;]] | {{{indextext|{{PAGENAME}}}}}}}'''</li>
 
<li>{{#if: {{{nextpage|}}} | [[{{{nextpage}}}|{{{nexttext|{{{nextpage}}}}}} &rarr;]] | }}</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}}}|&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}}}|&uarr; {{{indextext|{{PAGENAME}}}}} &uarr;]] | {{{indextext|{{PAGENAME}}}}}}}'''</td>
 
<td style="text-align: center; width:  33%">'''{{#if: {{{index|}}} | [[{{{index}}}|&uarr; {{{indextext|{{PAGENAME}}}}} &uarr;]] | {{{indextext|{{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></nowiki>}}
+
</tr></table></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.}}
Line 20: Line 12:
 
== Arguments ==
 
== Arguments ==
  
<tt><nowiki>{{Prevnext2</nowiki><br><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 35: Line 27:
 
Writing this:
 
Writing this:
  
<br><tt><nowiki>{{Prevnext2</nowiki><br><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 42: Line 34:
 
Gets you this:
 
Gets you this:
 
----
 
----
{{Prevnext2
+
{{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 52: Line 44:
 
Writing this:
 
Writing this:
  
<tt><nowiki>{{Prevnext2</nowiki><br><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 59: Line 51:
 
Gets you this:
 
Gets you this:
 
----
 
----
{{Prevnext2
+
{{PrevNext2
 
| nextpage=path/to/article
 
| nextpage=path/to/article
 
| nexttext=The next section
 
| nexttext=The next section
Line 67: Line 59:
 
Writing this:
 
Writing this:
  
<tt><nowiki>{{Prevnext2</nowiki><br><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 74: Line 66:
 
Gets you this:
 
Gets you this:
 
----
 
----
{{Prevnext2
+
{{PrevNext2
 
| prevpage=path/to/article
 
| prevpage=path/to/article
 
| prevtext=previous section
 
| prevtext=previous section
Line 83: Line 75:
 
Writing this:
 
Writing this:
  
<tt><nowiki>{{Prevnext2</nowiki><br><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 90: Line 82:
 
Gets you this:
 
Gets you this:
 
----
 
----
{{Prevnext2
+
{{PrevNext2
 
| nextpage=path/to/article
 
| nextpage=path/to/article
 
| prevpage=path/to/lastsection
 
| prevpage=path/to/lastsection
Line 100: Line 92:
 
Writing this:
 
Writing this:
  
<tt><nowiki>{{Prevnext2</nowiki><br><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 108: Line 100:
 
Gets you this:
 
Gets you this:
 
----
 
----
{{Prevnext2
+
{{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 117: Line 109:
 
Writing this:
 
Writing this:
  
<tt><nowiki>{{Prevnext2</nowiki><br><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 125: Line 117:
 
Gets you this:
 
Gets you this:
 
----
 
----
{{Prevnext2
+
{{PrevNext2
 
| nextpage=path/to/article
 
| nextpage=path/to/article
 
| nexttext=The next section
 
| nexttext=The next section

Revision as of 18:18, 30 July 2012


Dialog-information.png
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

{{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:



Example usage: omitting arguments

Writing this:

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

Gets you this:



Writing this:

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

Gets you this:



Example usage: the least amount of typing

Writing this:

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

Gets you this:



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:




Content is available under Creative Commons License SA 4.0 unless otherwise noted.