Difference between revisions of "Template:ForEach"

From West Of Vipers Gate
m (1 revision imported)
m
Line 21: Line 21:
 
| {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{21}}}}}}} }}</onlyinclude>
 
| {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{21}}}}}}} }}</onlyinclude>
 
== Usage ==
 
== Usage ==
 +
<pre>{{ForEach|Template_To_Use|join=&nbsp;
 +
|First
 +
|Second
 +
|Third
 +
|Fourth
 +
}}</pre>
 +
Using Repeat/Sample (which just prepends "Hello " to the string) yields:
 +
 
{{ForEach|Repeat/Sample|join=&nbsp;
 
{{ForEach|Repeat/Sample|join=&nbsp;
 
|First
 
|First

Revision as of 15:39, 18 September 2021

Usage

{{ForEach|Template_To_Use|join= 
|First
|Second
|Third
|Fourth
}}

Using Repeat/Sample (which just prepends "Hello " to the string) yields:

Hello First Hello Second Hello Third Hello Fourth