Template:ForEach
From Dragon Mania Legends (DML) Wiki
Template documentation |
---|
Note: portions of the template sample may not be visible without values provided. |
View or edit this template's documentation. (About template documentation) |
Example(s)
The following icon (files):
File:Fire Dragon Icon.png, File:Wind Dragon Icon.png, Water Dragon Icon.png
Can be specified as:
{{forEach|Fire, Wind, Water|di|2|separator=<br>}}
Which gives:
Fire Dragon
Wind Dragon
Water Dragon
Other Examples
This template can also be used (and is used in other templates) like:
{{forEach|Fire, Wind, Water|di||separator=<br>}}
gives:
Fire Dragon
Wind Dragon
Water Dragon{{forEach|Fire, Wind, Water|di|n|separator=<br>}}
gives:
Fire Dragon
Wind Dragon
Water Dragon{{forEach|Fire,Wind,Earth,Energy|ei|40px}}
gives:{{forEach| ,Wind (Element),Earth (Element),Energy (Element)|ctg|separator= {{sp}}--{{sp}} }}
gives:
Wind (Element) -- Earth (Element) -- Energy (Element) --
Important
- These are subject to important ParserFunctions limits.
See Also
{{ForEachIcon}}
, accepts a comma separated list of icon names and turns them into icons using{{i}}
.{{ForEachNoTemplate}}
, splits a comma-separated list into parts and applies plain-text content before and after each item, if specified.{{ForEachDragon}}
, splits a comma-separated list into parts and creates a list of dragons (link then icon) for use in EventBox and other templates.
Splits a comma-separated input list into parts and applies the template name provided, to each part. A separator like <br> can also be passed, which is added after each template. Only one parameter is supported for template name. Works for up to 15 comma-separated items. Do not use on large sets of items as doing so this way is VERY inefficient, which is why its use is limited.
Parameter | Description | Type | Status | |
---|---|---|---|---|
input list | 1 | no description
| String | required |
Template Name | 2 | no description | String | required |
Second (specified template) parameter | 3 | no description | String | optional |
separator (after template) | separator | no description | String | optional |