Difference between revisions of "Template:ForEach"
From West Of Vipers Gate
Silverwizard (talk | contribs) m (1 revision imported) |
m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
| {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{19}}}}}}} }}{{#if: {{{20|}}} | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{19}}}}}}} }}{{#if: {{{20|}}} | ||
| {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{20}}}}}}} }}{{#if: {{{21|}}} | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{20}}}}}}} }}{{#if: {{{21|}}} | ||
− | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{21}}}}}}} }}</onlyinclude> | + | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{21}}}}}}} }}{{#if: {{{22|}}} |
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{22}}}}}}} }}{{#if: {{{23|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{23}}}}}}} }}{{#if: {{{24|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{24}}}}}}} }}{{#if: {{{25|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{25}}}}}}} }}{{#if: {{{26|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{26}}}}}}} }}{{#if: {{{27|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{27}}}}}}} }}{{#if: {{{28|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{28}}}}}}} }}{{#if: {{{29|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{29}}}}}}} }}{{#if: {{{30|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{30}}}}}}} }}{{#if: {{{31|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{31}}}}}}} }}{{#if: {{{32|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{32}}}}}}} }}{{#if: {{{33|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{33}}}}}}} }}{{#if: {{{34|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{34}}}}}}} }}{{#if: {{{35|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{35}}}}}}} }}{{#if: {{{36|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{36}}}}}}} }}{{#if: {{{37|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{37}}}}}}} }}{{#if: {{{38|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{38}}}}}}} }}{{#if: {{{39|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{39}}}}}}} }}{{#if: {{{40|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{40}}}}}}} }}{{#if: {{{41|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{41}}}}}}} }}{{#if: {{{42|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{42}}}}}}} }}{{#if: {{{43|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{43}}}}}}} }}{{#if: {{{44|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{44}}}}}}} }}{{#if: {{{45|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{45}}}}}}} }}{{#if: {{{46|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{46}}}}}}} }}{{#if: {{{47|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{47}}}}}}} }}{{#if: {{{48|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{48}}}}}}} }}{{#if: {{{49|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{49}}}}}}} }}{{#if: {{{50|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{50}}}}}}} }}{{#if: {{{51|}}} | ||
+ | | {{#if: {{{join|}}} | {{{join}}} }}{{ {{{1}}} |{{#if: 1|{{{51}}}}}}} }}</onlyinclude> | ||
== Usage == | == Usage == | ||
− | {{ForEach|Repeat/Sample|join= | + | <pre>{{ForEach|Template_To_Use|join=<string between invocations> |
+ | |First | ||
+ | |Second | ||
+ | |Third | ||
+ | |Fourth | ||
+ | }}</pre> | ||
+ | Using Repeat/Sample for the template (which just prepends "Hello " to the string) and join=, yields: | ||
+ | |||
+ | {{ForEach|Repeat/Sample|join=, | ||
|First | |First | ||
|Second | |Second |
Latest revision as of 21:47, 1 February 2022
Usage
{{ForEach|Template_To_Use|join=<string between invocations> |First |Second |Third |Fourth }}
Using Repeat/Sample for the template (which just prepends "Hello " to the string) and join=, yields:
Hello First, Hello Second, Hello Third, Hello Fourth