Template:ForEachNoTemplate
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)
Syntax:
{{ForEachNoTemplate|Input string|AppendTextBeforeEach|AppendTextAfterEach|separator=ChosenSeparator}}
{{ForEachNoTemplate|Fire, Heavy Metal, Bamboo||{{sp}}Dragon|separator={{sp}}¦{{sp}}}}
gives:
Fire Dragon ¦ Heavy Metal Dragon ¦ Bamboo Dragon
{{ForEachNoTemplate|Fire, Heavy Metal, Bamboo||{{sp}}Dragon|separator=,{{sp}}}}
gives:
Fire Dragon, Heavy Metal Dragon, Bamboo Dragon
- The template also detects (at the end) if the next parameter exists, and if it does, it adds the (changeable) separator after the last entry; if a next parameter does not exist, it doesn't apply the separator.
See Also
{{ForEach}}
, splits a comma-separated input list into parts and applies the template name provided, to each part.{{ForEachIcon}}
, accepts a comma separated list of icon names and turns them into icons using{{i}}
.{{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 and applies plain-text content before and after each item, only if supplied. Is Primarily used in queries where appending plain text content to a list is needed. If you're not writing queries, or are trying to avoid applying a template to your content, this template may not be the right template to use (check ''see also'' below). Syntax: {{ForEachNoTemplate|Input string|AppendTextBeforeEach|AppendTextAfterEach|separator=ChosenSeparator}}. Note: The template also detects (at the end) if the next parameter exists, and if it does, it adds the (changeable) separator after the last entry; if a next parameter does not exist, it doesn't apply the separator.
Parameter | Description | Type | Status | |
---|---|---|---|---|
List items (comma-separated) | 1 | no description
| String | required |
Before text to prepend | 2 | no description | String | optional |
After text to append | 3 | no description | String | optional |
Separator | separator | no description | String | optional |