Template:Numlinks/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
== Parameters == | == Parameters == | ||
; <code>Current Num</code> (required) | ; <code>Current Num</code> (required) | ||
: The current number of the page. | : The current number of the page. By default, this is the first occurrence of a number in the page's name; if this is the wrong number, it may be specified using <code>#rmatch</code> or entered manually. | ||
; <code>Link Format</code> (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 <code>%s</code>. 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. | |||
; <code>Link Count</code> (optional; default <code>1</code>) | ; <code>Link Count</code> (optional; default <code>1</code>) | ||
| Line 13: | Line 16: | ||
; <code>Min</code> (optional; default <code>1</code>) | ; <code>Min</code> (optional; default <code>1</code>) | ||
: The minimum valid value for page numbers. | : The minimum valid value for page numbers. | ||
; <code>Display Format</code> (optional; default is to use <code>Link Format</code>) | ; <code>Display Format</code> (optional; default is to use <code>Link Format</code>) | ||
Revision as of 10:56, 10 October 2025
- This template is implemented by the Lua module Module:Numlinks.
- This template invokes the following functions: numlinks from Numlinks.
| This template has been deprecated. Its replacements are Template:Dochead and Template:Module introspection. |
| This template uses Lua: |
Template:Numlinks 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, such as 12edo or 12th-octave temperaments, this template generates links to its next and previous pages. This is meant for pages for which there are no intended gaps in the sequence of pages.
Parameters
Current Num(required)- The current number of the page. By default, this is the first occurrence of a number in the page's name; if this is the wrong number, it may be specified using
#rmatchor entered manually.
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(optional; default1)- The number of links to display before and after the current page.
Min(optional; default1)- The minimum valid value for page numbers.
Display Format(optional; default is to useLink Format)- Format for if the displayed text for the links is different, where
%sdenotes the page number. Default is to use the same value asLink Format.
Current Page Format(optional; default is to useDisplay Format)- Format for if the current-page text different, where
%sdenotes the page number. Default is to use the same value asDisplay Format.
Is Ordinal(optional; defaultfalse)- Toggles whether to display numbers as ordinals.
Is Table(optional; defaulttrue)- Toggles whether to output links as a 1-row 3-column table or as one line.