PDA

View Full Version : xTemplate hyphens in the if logic



loumac
24 Oct 2013, 2:16 AM
Can anyone tell me how to encode hyphens in the tpl if logic - I have tried quite a few without success
'<tpl if="data[\'array--rowedittable\'] == true">',

'<tpl if="data['array--rowedittable'] == true">',

'<tpl if="data[\'array--rowedittable\'] == true">',

'<tpl if="data[&quot;array--roweditable&quot;].valueOf() ==true">',

loumac
24 Oct 2013, 2:45 AM
this works :)

'<tpl if="values[&quot;array--rowedittable&quot;].valueOf()==true">'

and so does this

'<tpl if="values[\'array--rowedittable\'].valueOf()==true">'

where model has array--rowedittable type as boolean

hope it's useful to someone else