Module:Sandbox/BrandonXLF/Module:Map params/doc
![]() | 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 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=
.
Parameters
Input
|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 toyes
to 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
|1=
- The wikitext to map parameters to. Parameters are substituted with their number removed, i.e.|itemn=
becomes|item=
etc. The magic word{{I}}
is replaced with the current number.|call=
- Template to call. Parameters are passed with their number removed, i.e.|itemn=
becomes|item=
etc. Overrides|1=
.
Concatenation
|sep=
- Separator to add between outputs. Outer spaces can be added with{{sp}}
or 
.|conj=
- Special separator to use before the final output.
Advanced
|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 honoured when using|1=
. Defaults toyes
.
Tests
Basic
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Separator
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Conjunction
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Start
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Extra
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Sparse
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Sparse and start
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Prefix
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
No first number
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
First number required
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Sparse prefix
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Sparse no first number
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Sparse first number required
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Multiple prefixes
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Prefix extra
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
No expand with nowiki
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
No expand without nowiki
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Call
Script error: No such module "Sandbox/BrandonXLF/Module:Map wikitext".
Usage
{{#invoke:Sandbox/BrandonXLF/Module:Map params|function_name}}