Difference between revisions of "Template:For Each"
| Line 3: | Line 3: | ||
* Second parameter: delimiter to search for; default is comma | * Second parameter: delimiter to search for; default is comma | ||
* Third parameter: replacement delimiter; default is the search delimiter, or comma+space if none | * Third parameter: replacement delimiter; default is the search delimiter, or comma+space if none | ||
| − | * ''template'': template to apply to each substring (string provided as first parameter) | + | * ''template'': template to apply to each substring (string provided as first parameter; index provided as ''index'') |
</noinclude><includeonly>{{For Each/Raw|{{{1|}}}|{{#if:{{{2|}}}|{{{2}}}|,}}|{{{3|{{{2|, }}}}}}| | </noinclude><includeonly>{{For Each/Raw|{{{1|}}}|{{#if:{{{2|}}}|{{{2}}}|,}}|{{{3|{{{2|, }}}}}}| | ||
| template={{{template}}} | | template={{{template}}} | ||
Revision as of 22:56, 14 June 2015
Apply a template to each element of a list.
- First parameter: string to split
- Second parameter: delimiter to search for; default is comma
- Third parameter: replacement delimiter; default is the search delimiter, or comma+space if none
- template: template to apply to each substring (string provided as first parameter; index provided as index)