Skip to content

Using Loops for templating #251

@aminya

Description

@aminya

Is there a way to use loops to generate multiple html parts?
For example:

<div class="col-md-2">
	<div class="myClass">
		<img src="images/{{image i}}.png" alt="" class="myImages">
		<h3 class="name">{{name i}}</h3>
		<p>{{text i}}</p>
	</div>
</div>

in which we can fill in {{image i}}, {{name i}}, and {{text i}}, by giving an structure or an array of strings to a loop.
If i is for example 10, it should create 10 of these blocks. Or it can detect i based on the size of input struct/array.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions