Template:Prevnext: Difference between revisions

From Body Communication
m (1 revision imported)
No edit summary
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="display:flex; border:1px solid #bbb; background-color:#efefef; padding:0.3em">
<div style="display:flow-root;padding:0.3em;background-color:#f8f9fa;white-space:nowrap;border-top:1px solid #a2a9b1;border-bottom:1px solid #a2a9b1;font-size:0.9em;">
<div style="flex:1; order:1">{{#if: {{{2|}}} | [[{{{1}}}{{{2}}}|&larr; Previous]] }}</div>
<div style="float:left;  text-align:left; padding-right: 10px;">{{#if: {{{1|}}} | [[File:OOjs_UI_icon_arrowPrevious-ltr.svg|link={{{1}}}]] [[{{{1}}}]] }}</div>
<div style="flex:1; order:2; text-align:center">{{#if: {{{title|}}} | {{{title}}} }}</div>
<div style="float:right; text-align:right; padding-left: 10px; ">{{#if: {{{2|}}} | [[{{{2}}}]] [[File:OOjs_UI_icon_arrowNext-ltr.svg|link={{{2}}}]] }}</div>
<div style="flex:1; order:3; text-align:right">{{#if: {{{3|}}} | [[{{{1}}}{{{3}}}|Next &rarr;]] }}</div>
</div><noinclude>
</div><noinclude>


Line 9: Line 8:
==Usage==
==Usage==


<nowiki>{{Prevnext|base page name|prev extension|next extension}} </nowiki>
<nowiki>{{Prevnext|prev|next}} </nowiki>


E.G.  
E.G.  
:<nowiki>{{prevnext|User talk:SmackBot/archive|1|3}}</nowiki>
:<nowiki>{{prevnext|Introduction|Conversing with Your Body}}</nowiki>


{{prevnext|User talk:SmackBot/archive|1|3}}
{{prevnext|Introduction|Conversing with Your Body}}


Where there is no previous (or no next) the parameter may be left empty.
Where there is no previous (or no next) the parameter may be left empty.
E.G.
E.G.
:<nowiki>{{prevnext|User talk:SmackBot/archive||2}}</nowiki>
:<nowiki>{{prevnext||Introduction}}</nowiki>


{{prevnext|User talk:SmackBot/archive||2}}
{{prevnext||Introduction}}
 
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==
==Todo==
#add pretty buttons
#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 ==
== References ==
[https://prevnext.org/ PrevNext – What is This? How To Use It And Examples Of Prev Next]
[https://prevnext.org/ PrevNext – What is This? How To Use It And Examples Of Prev Next]
</noinclude>
</noinclude>

Latest revision as of 04:15, 7 November 2021

A quick template for cycling through a sequence of pages:

Usage

{{Prevnext|prev|next}}

E.G.

{{prevnext|Introduction|Conversing with Your Body}}

Where there is no previous (or no next) the parameter may be left empty. E.G.

{{prevnext||Introduction}}

Todo

  1. add pretty buttons

References

PrevNext – What is This? How To Use It And Examples Of Prev Next