More actions
Prd created the page Module:Params/doc/examples/enumerate using a non-default content model "wikitext" |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>The parameters of type <code>|foobar1</code>, <code>|foobar2</code> … <code>|foobarN</code> passed are: | |||
{{safesubst:<noinclude />#invoke:params|all_sorted|with_name_matching|^foobar%d+$|setting|ih| | |||
* |list_values}}</includeonly><noinclude>{{Documentation|heading=[[File:Test Template Info-Icon - Version (2).svg|50px|alt=|link=]] Template documentation}} | |||
[[Category:Module data pages]] | |||
</noinclude> |
Latest revision as of 23:57, 14 March 2025
This example template shows how to use {{#invoke:params|with_name_matching|...}} to emulate Module:Enumerate.
Note: For more complex cases, please see {{#invoke:params|call_for_each_group}}.
Usage
For instance,
{{module:params/doc/examples/enumerate
| 1 = cream
| 2 = bingo
| hello = world
| foobar1 = one
| foobar2 = two
| foobar3 = three
| foobar4 = foo
| foobar5 = bar
| foobar6 = Jupiter
}}
generates
The parameters of type |foobar1
, |foobar2
… |foobarN
passed are:
- one
- two
- three
- foo
- bar
- Jupiter