Difference between revisions of "Template:Prevnext"
Jump to navigation
Jump to search
(Copied code from https://en.wikipedia.org/wiki/Template:Prevnext) Tag: 2017 source edit |
m (Adding doc) |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
<div style="flex:1; order:2; text-align:center">{{#if: {{{title|}}} | {{{title}}} }}</div> | <div style="flex:1; order:2; text-align:center">{{#if: {{{title|}}} | {{{title}}} }}</div> | ||
<div style="flex:1; order:3; text-align:right">{{#if: {{{3|}}} | [[{{{1}}}{{{3}}}|Next →]] }}</div> | <div style="flex:1; order:3; text-align:right">{{#if: {{{3|}}} | [[{{{1}}}{{{3}}}|Next →]] }}</div> | ||
− | </div><noinclude> | + | </div> |
− | {{ | + | <noinclude> |
− | + | {{documentation}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }} | ||
</noinclude> | </noinclude> |
Latest revision as of 13:05, 25 March 2024
A quick template for cycling through a sequence of pages:
Usage
{{Prevnext|base page name|prev extension|next extension}}
E.G.
- {{prevnext|User talk:SmackBot/archive|1|3}}
Where there is no previous (or no next) the parameter may be left empty.
E.G.
- {{prevnext|User talk:SmackBot/archive||2}}
Where the previous is the base page, use an "_".
E.G.
- {{prevnext|User talk:SmackBot/archive|_|3}}
Todo
- add pretty buttons
- add ifexist clauses
- add "up", first, last?
- If and when
rel
attributes are enabled in MediaWiki, addprev
andnext
values, etc., to links.
References
PrevNext – What is This? How To Use It And Examples Of Prev Next Template:Uncat
The above documentation is transcluded from Template:Prevnext/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |