Module:Sandbox/BrandonXLF/Module:Map params/doc
Jump to navigation
Jump to search
| This is a documentation subpage for Module:Sandbox/BrandonXLF/Module:Map params. It may contain usage information, categories and other content that is not part of the original module page. |
| This module is rated as beta. It is considered ready for widespread use, but as it is still relatively new, it should be applied with some caution to ensure results are as expected. |
| File:Lua-Logo.svg | This module depends on the following other modules: |
{{#invoke:Map params|map}} maps parameters received by a function to wikitext using |1= or to a template call using |call=.
Usage
[edit source]{{#invoke:Map params|main|parameters}}
Parameters
[edit source]Input
[edit source]|prefixn=- The prefix of the parameters to process. All registered prefixes will be checked to determine if a number is present in the provided arguments.|prefix1=defaults to processing unnamed parameters.|extran=- An extra parameter to pass to the wikitext or template being called. If the extra parameter is suffixed with a number (same as prefixed parameters but not checked to determine if a number is present), add the suffix(i). For example,style(i).|sparse=- Set toyesto support parameter lists with gaps. Defaults tono.|optnum=- Whether or not to support passing the first parameter without a number, i.e. allow it to be|prefix=rather than|prefix1=. Defaults toyes.
Map to
[edit source]|1=- The wikitext to map parameters to. Parameters are substituted with their number removed, i.e.|itemn=becomes|item=etc. The parameter{{{i}}}is replaced with the current index and{{{1}}}is replaced with the current unnamed parameter (if applicable).|call=- Template to call. Parameters are passed with their number removed, i.e.|itemn=becomes|item=etc. The parameter{{{i}}}is the current index and{{{1}}}is the current unnamed parameter (if applicable). Overrides|1=.
Concatenation
[edit source]|sep=/|2=- Separator to add between outputs. To preserve leading and tailing whitespace,|2=can be used instead, or|1=when|call=is being used.|conj=- Special separator to use before the final output. Outer spaces can be added with{{sp}}or .
Advanced
[edit source]|expand=- Whether or not to expand templates, parser functions, extension tags, etc. after substituting parameters. This is most useful when|1=is used without<nowiki>...</nowiki>tags and can provide a slight performance advantage. Only relevant when using|1=. Defaults toyes.