Module:Params/doc: Difference between revisions

Content deleted Content added
mNo edit summary
Added note about surrounding spaces
Line 67:
 
If no arguments are passed the vertical bar (<code>&#124;</code>) will be used as parameter separator and the equals sign (<code>=</code>) will be used as key-value separator, with no header and no footer.
 
: {{a note}} All arguments passed to this functions are not trimmed of their leading and trailing spaces. The <code>list</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 77 ⟶ 79:
 
If no arguments are passed the vertical bar (<code>&#124;</code>) will be used as parameter separator, with no header and no footer.
 
: {{a note}} All arguments passed to this functions are not trimmed of their leading and trailing spaces. The <code>list_values</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 100 ⟶ 104:
 
If no other argument besides the template name are provided this function simply echoes the current parameters to another template.
 
: {{a note}} All arguments passed to this functions except the template name are not trimmed of their leading and trailing spaces. The <code>concat_and_call</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 111 ⟶ 117:
 
Exactly like [[#concat_and_call|<code>concat_and_call</code>]], but invokes a module instead of calling a template.
 
: {{a note}} All arguments passed to this functions except the module name and the function name are not trimmed of their leading and trailing spaces. The <code>concat_and_invoke</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 122 ⟶ 130:
 
All other unnamed parameters following the template name will be appended to the key-value pair. Named parameters will be passed verbatim.
 
: {{a note}} All arguments passed to this functions except the template name are not trimmed of their leading and trailing spaces. The <code>call_for_each</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 132 ⟶ 142:
 
Exactly like [[#call_for_each|<code>call_for_each</code>]], but invokes a module instead of calling a template.
 
: {{a note}} All arguments passed to this functions except the module name and the function name are not trimmed of their leading and trailing spaces. The <code>invoke_for_each</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 142 ⟶ 154:
 
All other unnamed parameters following the template name will be appended after the value parameter. Named parameters will be passed verbatim.
 
: {{a note}} All arguments passed to this functions except the template name are not trimmed of their leading and trailing spaces. The <code>call_for_each_value</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 152 ⟶ 166:
 
Exactly like [[#call_for_each_value|<code>call_for_each_value</code>]], but invokes a module instead of calling a template.
 
: {{a note}} All arguments passed to this functions except the module name and the function name are not trimmed of their leading and trailing spaces. The <code>invoke_for_each_value</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 164 ⟶ 180:
 
<syntaxhighlight lang="wikitext">{{#invoke:params|for_each|Arg name: $#, Arg value: $@}}</syntaxhighlight>
 
: {{a note}} All arguments passed to this functions are not trimmed of their leading and trailing spaces. The <code>for_each</code> function name itself, however, can be surrounded by spaces.
 
{{vpad}}
Line 211 ⟶ 229:
 
<syntaxhighlight lang="wikitext">{{#invoke:params|with_name_matching|n$|list|</dd><dt>|</dt><dd>|<dl><dt>|</dd></dl>}}</syntaxhighlight>
 
: {{a note}} The argument passed to this functions is not trimmed of its leading and trailing spaces. The <code>with_name_matching</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 225 ⟶ 245:
 
<syntaxhighlight lang="wikitext">{{#invoke:params|with_name_not_matching|n$|count}}</syntaxhighlight>
 
: {{a note}} The argument passed to this functions is not trimmed of its leading and trailing spaces. The <code>with_name_not_matching</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 239 ⟶ 261:
 
<syntaxhighlight lang="wikitext">{{#invoke:params|with_value_matching|n$|count}}</syntaxhighlight>
 
: {{a note}} The argument passed to this functions is not trimmed of its leading and trailing spaces. The <code>with_value_matching</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}
Line 253 ⟶ 277:
 
<syntaxhighlight lang="wikitext">{{#invoke:params|with_value_not_matching|n$|count}}</syntaxhighlight>
 
: {{a note}} The argument passed to this functions is not trimmed of its leading and trailing spaces. The <code>with_value_not_matching</code> function name itself, however, can be surrounded by spaces.
 
{{vpad|1.5em}}