Ho un modello doT.js simile a questo:doT.js fare qualcosa ogni terza iterazione
{{?it.books.length }}
{{~it.books :value}}
<li>
<article class='Teaser'>
<a href='{{=value.url}}' title='{{=value.title}}'>
<img src='{{=value.image}}' />
</a>
<h3>
<a href='{{=value.url}}' title='{{=value.title}}'>{{=value.title}}</a>
</h3>
</article>
</li>
// this should only be rendered every 3rd time
<br class='clear' />
{{~}}
{{?}}
Il BR-Tag, alla fine, dovrebbe essere reso solo ogni terza volta. Come faccio a fare questo?
funziona perfetto, grazie! ho dimenticato di mettere: indice in {{~ it.books: valore: indice}} –