Template: iterating over a collection

  • Klaus79
    Teilnehmer
      vor 4 Jahren, 2 Monaten #26618

      Is it possible to iterate over a collection (as input parameter) in a template?

      Maybe there is a documentation how to achive it (which I haven’t found, yet).

      Vitali Kurdasov
      Moderator
        Has successfully completed the online course Intermediate (200)
        Has successfully completed the online course Basics (100)
        Has successfully completed the online course Advanced (310)
        Has successfully completed the Intermediate Certification
      vor 4 Jahren, 2 Monaten #26619
      Up
      2
      Down
      ::

      Hi Klaus,

      You can iterate in templates with the mustache notation. This will look like this:

      {{#pathToArray}}
      {{key}} or {{this}} if it is a simple array
      {{/pathToArray}}

      You can find more information here.

    Ansicht von 2 Beiträgen – 1 bis 2 (von insgesamt 2)

    You must be logged in to reply to this topic.