Module:Params/doc: Difference between revisions

Content deleted Content added
Added note about surrounding spaces
mNo edit summary
Line 68:
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.
 
: {{aA 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 80:
If no arguments are passed the vertical bar (<code>&#124;</code>) will be used as parameter separator, with no header and no footer.
 
: {{aA 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 105:
If no other argument besides the template name are provided this function simply echoes the current parameters to another template.
 
: {{aA 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 118:
Exactly like [[#concat_and_call|<code>concat_and_call</code>]], but invokes a module instead of calling a template.
 
: {{aA 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 131:
All other unnamed parameters following the template name will be appended to the key-value pair. Named parameters will be passed verbatim.
 
: {{aA 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 143:
Exactly like [[#call_for_each|<code>call_for_each</code>]], but invokes a module instead of calling a template.
 
: {{aA 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 155:
All other unnamed parameters following the template name will be appended after the value parameter. Named parameters will be passed verbatim.
 
: {{aA 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 167:
Exactly like [[#call_for_each_value|<code>call_for_each_value</code>]], but invokes a module instead of calling a template.
 
: {{aA 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 181:
<syntaxhighlight lang="wikitext">{{#invoke:params|for_each|Arg name: $#, Arg value: $@}}</syntaxhighlight>
 
: {{aA 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 230:
<syntaxhighlight lang="wikitext">{{#invoke:params|with_name_matching|n$|list|</dd><dt>|</dt><dd>|<dl><dt>|</dd></dl>}}</syntaxhighlight>
 
: {{aA 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 246:
<syntaxhighlight lang="wikitext">{{#invoke:params|with_name_not_matching|n$|count}}</syntaxhighlight>
 
: {{aA 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 262:
<syntaxhighlight lang="wikitext">{{#invoke:params|with_value_matching|n$|count}}</syntaxhighlight>
 
: {{aA 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 278:
<syntaxhighlight lang="wikitext">{{#invoke:params|with_value_not_matching|n$|count}}</syntaxhighlight>
 
: {{aA 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}}