Difference between revisions of "Module:Check for clobbered parameters/doc"
Jump to navigation
Jump to search
blackwiki>Frietjes (←Created page with '{{Module rating |alpha}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> This...') |
blackwiki>Frietjes |
||
| Line 15: | Line 15: | ||
By default, the module ignores blank parameters which is useful for {{tl|if empty}} chains of parameters. For nested changes of parameters, use {{para|nested|1}} to consider blank parameters as well. | By default, the module ignores blank parameters which is useful for {{tl|if empty}} chains of parameters. For nested changes of parameters, use {{para|nested|1}} to consider blank parameters as well. | ||
| + | |||
| + | By default, the delimiter for the tuples is <code>;</code> but this can be changed with {{para|delimiter}}. | ||
| + | |||
| + | The value of {{para|template}} is used to for the text of the preview warning message. When omitted, the module will use a generic message. | ||
== Example 1 == | == Example 1 == | ||
Revision as of 21:31, 15 November 2019
| 26x26px | This module is rated as alpha. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome. |
This module may be appended to a template to check for uses of tuples of conflicting parameters.
Usage
Basic usage
{{#invoke:clobbered parameters|check
|nested=1
|template=Some template name
|cat={{main other|Category:Some tracking category}}
|arg1a; arg1b|arg2a; arg2b; arg2c|...|argNa; argNb}}
Here, (arg1a, arg1b), (arg2a, arg2b, arg2c), are tuples of the conflicting parameters.
By default, the module ignores blank parameters which is useful for {{if empty}} chains of parameters. For nested changes of parameters, use |nested=1 to consider blank parameters as well.
By default, the delimiter for the tuples is ; but this can be changed with |delimiter=.
The value of |template= is used to for the text of the preview warning message. When omitted, the module will use a generic message.
Example 1
{{Infobox
| above = {{{name|}}}
| label1 = Founder{{#if:{{{founders|}}}|s}}
| data1 = {{if empty| {{{founders|}}} | {{{founder|}}} }}
| label2 = Headquarters
| data2 = {{if empty| {{{headquarters|}}} | {{{hq|}}} | {{{location|}}} }}
}}<!--
end infobox, start tracking
-->{{#invoke:clobbered parameters|check
| template = Infobox example
| cat = {{main other|Category:Pages using infobox example with conflicting parameters}}
| founders; founder
| headquarters; hq; location
}}
Example 2
{{Infobox
| above = {{{name|}}}
| label1 = Founder(s)
| data1 = {{{founders|{{{founder|}}}}}}
| label2 = Headquarters
| data2 = {{{headquarters|{{{hq|{{{location|}}}}}}}}}
}}<!--
end infobox, start tracking
-->{{#invoke:clobbered parameters|check
| nested = 1
| template = Infobox example
| cat = {{main other|Category:Pages using infobox example with conflicting parameters}}
| founders; founder
| headquarters; hq; location
}}
See also