Difference between revisions of "Template:Prevnext"

From Lorekeeper Wiki
Jump to navigation Jump to search
(Copied code from https://en.wikipedia.org/wiki/Template:Prevnext)
Tag: 2017 source edit
 
m (Fixed, gonna move doc soon)
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 &rarr;]] }}</div>
 
<div style="flex:1; order:3; text-align:right">{{#if: {{{3|}}} | [[{{{1}}}{{{3}}}|Next &rarr;]] }}</div>
</div><noinclude>
+
</div>
{{doc|content=
 
A quick template for cycling through a sequence of pages:
 
 
 
==Usage==
 
 
 
<nowiki>{{Prevnext|base page name|prev extension|next extension}} </nowiki>
 
 
 
E.G.
 
:<nowiki>{{prevnext|User talk:SmackBot/archive|1|3}}</nowiki>
 
 
 
{{prevnext|User talk:SmackBot/archive|1|3}}
 
 
 
Where there is no previous (or no next) the parameter may be left empty.
 
E.G.
 
:<nowiki>{{prevnext|User talk:SmackBot/archive||2}}</nowiki>
 
 
 
{{prevnext|User talk:SmackBot/archive||2}}
 
 
 
Where the previous is the base page, use an "_".
 
E.G.
 
:<nowiki>{{prevnext|User talk:SmackBot/archive|_|3}}</nowiki>
 
 
 
{{prevnext|User talk:SmackBot/archive|_|3}}
 
 
 
==Todo==
 
#add pretty buttons
 
#add ifexist clauses
 
#add "up", first, last?
 
#If and when <code>rel</code> attributes are enabled in MediaWiki, add <code>prev</code> and <code>next</code> values, etc., to links.
 
 
 
== References ==
 
[https://prevnext.org/ PrevNext – What is This? How To Use It And Examples Of Prev Next]
 
{{uncat}}
 
 
 
}}
 
</noinclude>
 

Revision as of 13:04, 25 March 2024