Template:Numlinks 2-num

From Xenharmonic Wiki
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]
This template is a metatemplate. It is used to build other templates and should not be used standalone, except for testing or simple usage. This template is implemented by the Lua module Module:Numlinks 2-num.
This template invokes the following functions: numlinks_2_num from Numlinks 2-num.

Template:Numlinks 2-num is intended as a meta-template (a template used to construct other templates), used to build navigational templates. This can be used directly, or by using its corresponding module, Module:Numlinks.

For a numbered page page with two numbers, such as 5L 2s, this template generates links to its next and previous pages, for both numbers. This is meant for pages for which there are no intended gaps in the sequence of pages.

Parameters

Current Num 1 and Current Num 2 (required)
The current number of the page.
Link Format (required)
The text used for page links, as a format string. By default, this is the page's name, where the number is replaced with %s. If there are multiple numbers, or the number is an ordinal (1st, 2nd, etc), it's necessary to enter the format string manually to avoid issues.
Link Count 1 and Link Count 2 (optional; default 1)
The number of links to display before and after the current page.
Min 1 and Min 2 (optional; default 1)
The minimum valid value for page numbers.
Display Format (optional; default is to use Link Format)
Format for if the displayed text for the links is different, where %s denotes the page number.
Current Page Format (optional; default is to use Display Format)
Format for if the current-page text different, where %s denotes the page number.
Is Ordinal 1 and Is Ordinal 2 (optional; default false)
Toggles whether to display numbers as ordinals.

See also

todo: add #rmatch and #rreplace to extract page numbers and link format