Content deleted Content added
→trimmed: Move suggestion below and expand it |
Use {{tj}} when showing template examples |
||
Line 16:
and such template were called with the following arguments,
|Morgawr the following result would be produced:
Line 111 ⟶ 112:
<syntaxhighlight lang="wikitext">{{#invoke:params|concat_and_call|foo bar|elbow|earth|room|7=classy|hello=not today}}</syntaxhighlight>
and
the following call to the <code><nowiki>{{Foo bar}}</nowiki></code> template would be performed:
|wind: spicy|hello: not today}}
If no other argument besides the template name are provided this function simply echoes the current parameters to another template.
Line 318 ⟶ 320:
}}</syntaxhighlight>
{{A note|Suggestion:}} Although <syntaxhighlight lang="wikitext" inline>{{#invoke:params|trimmed|-1|1|...}}</syntaxhighlight> de facto gets rid of all sequential parameters, it is clearer and more idiomatic to write <syntaxhighlight lang="wikitext" inline>{{#invoke:params|non-sequential|...}}</syntaxhighlight> to obtain the same effect. Writing <syntaxhighlight lang="wikitext" inline>{{#invoke:params|sequential|trimmed|-1|1|...}}</syntaxhighlight> will
{{vpad}}
|