BorisMoore/jsrender — Issue #33: access iteration index
Author: cyburk
Created: 2011-12-02 12:44:54+00:00
State: open

it would be nice to have access from within a template to the current iteration index, e.g. {{=$ctx.index}}

some use cases:
* output a numbered data list
* limit to the top 10
* enable pagination for data tables (only show entries from 1-3, 4-6, etc.)

the index could always be stored in the data before hand, but there should not be a correlation between display position and data, e.g. a filtered data table, whose first result may not be the first data entry.