View Full Version : how to pass index-Id from list into XTemplate function

12 Jul 2011, 6:21 AM
hi there!

I want to create a dynamically variating list with XTemplates. unfort. you can't pass the index-id though a function within an if-construct like

var newItemTpl = '<div class="list_websites_item"><div class="' + cmp.id + '">' + orgItemTpl + '</div>' + '<div class="iconset">' +
'<tpl if="Ext.getCmp(\'' + cmp.id + '\').plugins[0].isPendingItem({[xindex-1]})">'+
'<p>IS PENDING</p>'+
'</tpl>' +
'</div></div>';when I call isPendingItem({[xindex-1]}) with argument I get the error

SyntaxError: Parse errorSo how could I pass arguments here?