[SOLVED] : if else in Ext.XTemplate
Hi,
I am trying to show different thumbnail for video and images.
Now there is some syntax error. Can someone help with this?.
Thanks.
Code:
myexpander= new Ext.grid.RowExpander({
tpl: new Ext.XTemplate(
'<p>', '<tpl if="mediatype==image">',
'<p><img src="'+Ext.webhost+'/media/{property}/images/{medianame_file}" width="100" height="75" ></p>',
'</tpl>',
'<tpl if="mediatype==video">',
'<p><img src="'+Ext.webhost+'/media/video.jpg" width="100" height="75" ></p>',
'</tpl>',
'</p>'
)
});
Image and video are strings. mediatype is column value
I think it is problem of comparing to string. It is assuming video and image as column.