I want to add a </br>
after 12 iterations in an XTemplate
. I tried many approaches, but couldn't get it to work. Sample code is below:
days = new Ext.XTemplate(
'<b>Days of month</b>',
'<table width="100%"><tr><td style="word-wrap:break-word;">',
'<tpl for=".">',
'<tpl for="data">',
**'{% if (xindex % 12 === 0) { %}' +
'<br/>' +
'{% } %}',**
,'{fieldValue}',
'</tpl>',
'</tpl>',
'</td></tr></table>',
I tried to use xindex
, but it did not have any effect and does not add a newline after 12 records. What I am doing wrong?
` or forget the slash `
` – Musa Aug 22 '13 at 01:12