Template:Previous

From DynamicPageList3 Manual
Revision as of 02:00, 10 April 2023 by imported>FrozenPlum (debug should be at top, not bottom)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Creates previous navigation between items in a specified category. Is written to be embedded in another template to style as a navigation bar, and automatically generate previous page links from whatever the current {{PAGENAME}} is.

Examples

{{previous|category=Fruit examples}}

Result: {{#dpl: |debug=0 |category=Fruit examples |notcategory= |namespace=Main |titlelt=Previous |mode=inline |ordermethod=title |order=descending |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.

See also