Template:For Each/Raw: Difference between revisions

From Fish Family Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
| {{{{{template}}}|{{{value}}}|
| {{{{{template}}}|{{{value}}}|
   index={{{index}}}
   index={{{index}}}
}}}}{{{3}}}{{For Each/Raw|{{{1}}}|{{{2}}}|{{{3}}}|
}}{{{3}}}{{For Each/Raw|{{{1}}}|{{{2}}}|{{{3}}}|
| template={{{template}}}
| template={{{template}}}
| index={{#expr: {{{index}}} + 1}}
| index={{#expr: {{{index}}} + 1}}
| value={{#explode:{{{1}}}|{{{2}}}|{{{index}}}}}
| value={{#explode:{{{1}}}|{{{2}}}|{{{index}}}}}
}}</includeonly>
}}}}</includeonly>

Revision as of 00:02, 15 June 2015

Helper for Template:For Each.

  • First parameter: string to split
  • Second parameter: delimiter to search for
  • Third parameter: replacement delimiter
  • template: template to apply to each substring (string provided as first parameter; index passed as index)
  • index: current split index; 1-based
  • value: current split value