Jump to content

Template:ForeachLoop: Difference between revisions

From Parasol
Created page with "{{#if: {{{1|}}} | <!-- Check if the input parameter is not empty --> {{#explode: {{{1}}} |, |values}} <!-- Split the input parameter by commas and assign to a named variable 'values' --> {{#foreach: values |value| <!-- Loop through the 'values' variable --> * Item: {{{value}}} }} }}"
Tag: wikieditor
 
No edit summary
Tag: wikieditor
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if: {{{1|}}} | <!-- Check if the input parameter is not empty -->
{{#invoke:CSVIterator|iterateCSV|{{{1}}}}}
    {{#explode: {{{1}}} |, |values}} <!-- Split the input parameter by commas and assign to a named variable 'values' -->
    {{#foreach: values |value| <!-- Loop through the 'values' variable -->
        * Item: {{{value}}}
    }}
}}

Latest revision as of 20:16, 3 November 2023

{{#invoke:CSVIterator|iterateCSV|{{{1}}}}}