Content deleted Content added
Document {{#invoke:params|with_name_matching|...}} and similar functions |
Add vertical padding |
||
Line 47:
Here follows the list of functions. All modifiers are applicable to all of them (see [[#Modifiers (piping functions)|§ Modifiers]]).
{{vpad}}
=== <code>count</code> ===
Line 55 ⟶ 57:
This function does not take arguments.
{{vpad}}
=== <code>list</code> ===
Line 63 ⟶ 67:
If no arguments are passed the vertical bar (<code>|</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.
{{vpad}}
=== <code>list_values</code> ===
Line 71 ⟶ 77:
If no arguments are passed the vertical bar (<code>|</code>) will be used as parameter separator, with no header and no footer.
{{vpad}}
=== <code>concat_and_call</code> ===
Line 92 ⟶ 100:
If no other argument besides the template name are provided this function simply echoes the current parameters to another template.
{{vpad}}
=== <code>concat_and_invoke</code> ===
Line 101 ⟶ 111:
Exactly like [[#concat_and_call|<code>concat_and_call</code>]], but invokes a module instead of calling a template.
{{vpad}}
=== <code>call_for_each</code> ===
Line 110 ⟶ 122:
All other unnamed parameters following the template name will be appended to the key-value pair. Named parameters will be passed verbatim.
{{vpad}}
=== <code>invoke_for_each</code> ===
Line 118 ⟶ 132:
Exactly like [[#call_for_each|<code>call_for_each</code>]], but invokes a module instead of calling a template.
{{vpad}}
=== <code>call_for_each_value</code> ===
Line 126 ⟶ 142:
All other unnamed parameters following the template name will be appended after the value parameter. Named parameters will be passed verbatim.
{{vpad}}
=== <code>invoke_for_each_value</code> ===
Line 134 ⟶ 152:
Exactly like [[#call_for_each_value|<code>call_for_each_value</code>]], but invokes a module instead of calling a template.
{{vpad}}
=== <code>for_each</code> ===
Line 146 ⟶ 166:
== Modifiers (piping functions) ==
The following are ''modifiers'', i.e. functions that expect to be piped instead of returning to the caller. Each of them can be followed by either another modifier or a non-piping function.
{{vpad}}
=== <code>sequential</code> ===
Line 158 ⟶ 181:
This function does not take arguments besides the name of the function that must follow.
{{vpad}}
=== <code>non-sequential</code> ===
Line 170 ⟶ 195:
This function does not take arguments besides the name of the function that must follow.
{{vpad}}
=== <code>with_name_matching</code> ===
Line 182 ⟶ 209:
<syntaxhighlight lang="wikitext">{{#invoke:params|with_name_matching|n$|list|</dd><dt>|</dt><dd>|<dl><dt>|</dd></dl>}}</syntaxhighlight>
{{vpad}}
=== <code>with_name_not_matching</code> ===
Line 194 ⟶ 223:
<syntaxhighlight lang="wikitext">{{#invoke:params|with_name_not_matching|n$|count}}</syntaxhighlight>
{{vpad}}
=== <code>with_value_matching</code> ===
Line 206 ⟶ 237:
<syntaxhighlight lang="wikitext">{{#invoke:params|with_value_matching|n$|count}}</syntaxhighlight>
{{vpad}}
=== <code>with_value_not_matching</code> ===
Line 218 ⟶ 251:
<syntaxhighlight lang="wikitext">{{#invoke:params|with_value_not_matching|n$|count}}</syntaxhighlight>
{{vpad}}
=== <code>trimmed</code> ===
|