Home >Backend Development >PHP Tutorial >How art-template's {{}} loop supports conditional indexing.
For example
{{each data as value index}}
<code><li><a href="#">{{index}}</a></li></code>
{{/each}}
Pagination bar, one pagination for every 10 columns, and only 5 paginations at most.
How to do it using {{}} syntax?
For example
{{each data as value index}}
<code><li><a href="#">{{index}}</a></li></code>
{{/each}}
Pagination bar, one pagination for every 10 columns, and only 5 paginations at most.
How to do it using {{}} syntax?
Your needs should be controlled at the back end. The front end each is only responsible for looping, and the front end supports if judgment {{if index 1}}{{/if}}