PDA

View Full Version : XTemplate: conditional concatination



daly
1 May 2012, 7:24 PM
Hi, all!

How can I use order number {#} in conditional string for conditional concatination?
I try this code

new Ext.XTemplate('<tpl for=".">',
'<tpl if="{#} > 1">,</tpl>',
'{name}'
'</tpl>');
but it thow error "invalid property id"

p.s. sorry for my english

scottmartin
14 May 2012, 7:15 AM
Is {#} supposed to resolve to something? Where is this coming from?

Regards,
Scott.

mitchellsimoens
17 May 2012, 7:26 AM
{#} should equate to the index of the item in the array