Toggle menu
15
236
70
27.6K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

This is a simplified wrapper for Template:For nowiki. It allows you to iterate over a custom delimited list.

The expected use case for this is to simplify passing lists between templates.

Usage

Parameters

  • separator (required) defines how the items are separated
  • delimited string (required is a string separated by delim
  • delim (optional) the delimiter for the string, defaults to ,
  • Calling (one is required)
    • call template (that takes one unnamed argument) to call (ex, 3x).
    • nowikistart and nowikiend. Code to be placed before and after each param value (ex: for 3x, respectively use <nowiki>{{3x|</nowiki> and <nowiki>}}</nowiki>) Both are required if used

Notes

  • Leading and trailing spaces are stripped from delims. ie:
  • {{For loop delimited|--|a,b,c,d|call=3x}}
  • {{For loop delimited|--|a, b, c, d|call=3x}}
  • {{For loop delimited|--|a,b,c,d|delim=, |call=3x}}
  • {{For loop delimited|--|a ,b ,c ,d |delim=,|call=3x}}
all return:
aaa--bbb--ccc--ddd

Examples

Markup Renders as
{{For loop delimited|--|a,b,c,d|call=3x}}

aaa--bbb--ccc--ddd

{{For loop delimited|--|a,b,c,d|nowikistart=<nowiki>{{3x|</nowiki>|nowikiend=<nowiki>}}</nowiki>}}

aaa--bbb--ccc--ddd

{{For loop delimited|--|a, b, c, d|delim=,|call=3x}}

aaa--bbb--ccc--ddd

{{For loop delimited|--|aXbXcXdX|delim=X|call=3x}}

aaa--bbb--ccc--ddd