Template:Foreach2: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(adding second pass_thru parameter)
(better docs, explaining this specific template; /cat)
Line 13: Line 13:
-->{{#ifexpr:{{{up_to}}}>11|{{{{{call}}}|{{#explode:{{{item_in}}}|{{{delim|,}}}|12}}|{{{pass_thru_name1}}}={{{pass_thru_arg1|}}}|{{{pass_thru_name2}}}={{{pass_thru_arg2|}}}}}}}<!--
-->{{#ifexpr:{{{up_to}}}>11|{{{{{call}}}|{{#explode:{{{item_in}}}|{{{delim|,}}}|12}}|{{{pass_thru_name1}}}={{{pass_thru_arg1|}}}|{{{pass_thru_name2}}}={{{pass_thru_arg2|}}}}}}}<!--
-->{{#ifexpr:{{{up_to}}}>12|{{{{{call}}}|{{#explode:{{{item_in}}}|{{{delim|,}}}|13}}|{{{pass_thru_name1}}}={{{pass_thru_arg1|}}}|{{{pass_thru_name2}}}={{{pass_thru_arg2|}}}}}}}</includeonly><noinclude>
-->{{#ifexpr:{{{up_to}}}>12|{{{{{call}}}|{{#explode:{{{item_in}}}|{{{delim|,}}}|13}}|{{{pass_thru_name1}}}={{{pass_thru_arg1|}}}|{{{pass_thru_name2}}}={{{pass_thru_arg2|}}}}}}}</includeonly><noinclude>
Passes a list of items separated by a delimiter to a specified template.
A second copy of the [[Template:Foreach|Foreach]] template, created simply so that this code can be invoked twice in a string of template calls without provoking MediaWiki's famous "template loop detected" error.


[[Category:Macro templates]]
[[Category:Utility templates]]
</noinclude>
</noinclude>

Revision as of 04:12, 13 December 2015

A second copy of the Foreach template, created simply so that this code can be invoked twice in a string of template calls without provoking MediaWiki's famous "template loop detected" error.