Please remember to make use of the DML Wiki Manual of Style and Code of Conduct during your stay.

 Actions

Template

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.

Template parameters

ParameterDescriptionTypeStatus
List items (comma-separated)1

no description

Example
Fire, Heavy Metal, Bamboo
Stringrequired
Before text to prepend2

no description

Stringoptional
After text to append3

no description

Stringoptional
Separatorseparator

no description

Stringoptional


This Wiki is created by players for other players and is not maintained by, or affiliated with, the game maker (Gameloft).
Cookies help us deliver our services. By using our services, you agree to our use of cookies.