Template: iterating over a collection

  • Klaus79
    Participant
    • Topics: 38
    • Replies: 46
    # 1 month ago

    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
    Moderator
    • Topics: 0
    • Replies: 8
    # 1 month ago
    Up
    1
    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.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.