How can I loop through an array passed as the context?
Sweeper777 opened this issue · 1 comments
Sweeper777 commented
For example, if I have:
{% include "myTemplate.stencil" array1 %} {# "array1" is an array #}
And in myTemplate.stencil
, how can I loop though it?
{% for item in ??? %}
...
{% endfor %}
I can't seem to use the array properties either, like {{ count }}
.
djbe commented
Currently you can't. If anyone knows if Jinja handles this, and how, that info would be very welcome. I did a quick search but couldn't find any information about this.