Advertisement

ExplodeForeach

(view | edit | purge | history)

Template documentation (the template shown above may sometimes be hidden or invisible)

Purpose

To repeatedly use a template for each argument in an exploded string.

Usage

{{ExplodeForeach|delim=delimiter|templatename|inputstring|separator}}
  • templatename - The name of a template that takes at least one parameter. Only the first parameter will be used, so the remaining parameters must be optional.
  • inputstring - Contains all of the elements that need to be processed with the separator between each element
  • separator - Splits up the input string in several arguments. Leading whitespaces will be trimmed.
  • delimiter - (optional) A delimiter that should be inserted between the list items after the template templatename has been applied to each

Example

{{ExplodeForeach|delim=<br/>|PageIcon5|Swordsman, Mohawk warrior, Legion|,}}

Swordsman (Civ5).png  Swordsman
Mohawk Warrior (Civ5).png  Mohawk Warrior
Legion (Civ5).png  Legion


Community content is available under CC-BY-SA unless otherwise noted.