mustache / mustache.github.com

The {{official}} website
http://mustache.github.io/
Other
2.32k stars 293 forks source link

Make current index available for lists #117

Closed Rykus0 closed 11 months ago

Rykus0 commented 5 years ago

I've found it extremely limiting not to be able to have a reference to the current index while rendering lists of data. An example of when this is useful is when each rendered item needs a unique ID.

Currently the workaround is to include this unique ID in the data, but that is error-prone and not really the correct place for it.

Thank you for considering this feature

davrob01 commented 5 years ago

I would also like to see this feature. Thank you.

jgonggrijp commented 11 months ago

Closing this because this repository is about the website and not about the Mustache template language. Please take comments about the template language to https://github.com/mustache/spec/discussions.

Previous discussions about this particular topic can be found via https://github.com/mustache/spec/discussions/163, https://github.com/mustache/spec/discussions/153 and https://github.com/mustache/spec/discussions/164.