Module:Enumerate/doc: Difference between revisions
Appearance
Content deleted Content added
→Usage: fix display |
→See also: New section |
||
Line 62: | Line 62: | ||
== Examples == |
== Examples == |
||
* [[Template:CCI project notice]] |
* [[Template:CCI project notice]] |
||
== See also == |
|||
* {{mfl|params|with_name_matching}} |
|||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | |
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | |
Revision as of 19:22, 3 February 2024
Usage
This module is meant to be invoked inside of a template, since it requires the argument list of the calling template.
This module allows the enumeration of a set of parameters with a given prefix. If the prefix was notes
, the parameters notes1
, notes2
, notes3
, and so on will be enumerated in a unordered list until it sees the first null parameter.
The prefix is defined by the first argument passed into the invocation.
Template:X35 |
---|
{{#invoke:Enumerate|main|notes}} |
Any page |
{{X35 | notes1 = Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | notes2 = Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | notes3 = Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. | notes4 = Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. }} |
Output |
|
The entries will cut off in the event that the parameters are out of order.
Template:X35 |
---|
{{#invoke:Enumerate|main|notes}} |
Any page |
{{X35 | notes1 = Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | notes2 = Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | notes3 = | notes4 = Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. }} |
Output |
|
Do note that {{X35}} is sandbox template and does not actually call this module.
Examples
See also