yogthos / Selmer

A fast, Django inspired template system in Clojure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to access index in for loop.

lagahrajan opened this issue · comments

Tried

{% for item in items%}
 {{index}}
 {{@index}}
 {{loop.index}}
 {{forloop.index}}
{% endfor %}

None of above seems to work. What is the right way?

I think you want to use forloop.counter here.

@yogthos Thankyou 👍