Template:Next: Difference between revisions
Content added Content deleted
imported>FrozenPlum mNo edit summary |
imported>FrozenPlum m (fix) |
||
Line 1: | Line 1: | ||
<noinclude>Creates next navigation between items in a specified category. Is written to be embedded in another template to style as a navigation bar, and automatically generate next page links from whatever the current <code><nowiki>{{PAGENAME}}</nowiki></code> is.</noinclude><includeonly>{{#dpl: |
<noinclude>Creates next navigation between items in a specified category. Is written to be embedded in another template to style as a navigation bar, and automatically generate next page links from whatever the current <code><nowiki>{{PAGENAME}}</nowiki></code> is.</noinclude><includeonly>{{#dpl: |
||
⚫ | |||
|category={{{category|}}} |
|category={{{category|}}} |
||
|notcategory={{{notcategory|}}} |
|notcategory={{{notcategory|}}} |
||
Line 6: | Line 7: | ||
|mode=inline |
|mode=inline |
||
|ordermethod=title |
|ordermethod=title |
||
|order= |
|order=ascending |
||
|count=1 |
|count=1 |
||
|format=,<div style="text-align:right;">[[%PAGE%|%TITLE%]] [[File:Double arrow.png|25px|link=%PAGE%|alt=>]]</div>, |
|format=,<div style="text-align:right;">[[%PAGE%|%TITLE%]] [[File:Double arrow.png|25px|link=%PAGE%|alt=>]]</div>, |
||
⚫ | |||
}}</includeonly><noinclude> |
}}</includeonly><noinclude> |
||
==Examples== |
==Examples== |
Latest revision as of 02:00, 10 April 2023
Creates next navigation between items in a specified category. Is written to be embedded in another template to style as a navigation bar, and automatically generate next page links from whatever the current {{PAGENAME}}
is.
Examples
{{next|category=Fruit examples}}
Result: {{#dpl: |debug=0 |category=Fruit examples |notcategory= |namespace=Main |titlegt=Next |mode=inline |ordermethod=title |order=ascending |count=1
|format=,
,
}}
Notes
The #titleparts
section of the ParserFunctions page explains that Magic Words like {{PAGENAME}}
occasionally return strings as needlessly HTML-encoded, this formerly caused DPL3 to not return results when page names contain '
and other special characters. Use of {{#titleparts:{{PAGENAME}}}}
HTML-decodes, converting it to plain text.