bhaidaya
3 Mar 2012, 6:09 PM
Is it possible to call functions within templates using the designer interface?
I'm trying to do something simple (outside of the designer interface ) but struggling to find the right place within the designer if any.
Displaying a list of images in an Ext.dataview.List based on a field value, while still displaying a default image if none is provided.
outside the interface you can just include something like this
var tpl = new Ext.XTemplate(
'<img class="photo" src="{ImageName:this.transformImage}" />',
{transformImage: function(value){return Ext.isEmpty(value) ? 'placeholder.jpg' : value;}
)
but inside the interface anything pasted into the field is scrubbed for quotes and other characters.
I'm trying to do something simple (outside of the designer interface ) but struggling to find the right place within the designer if any.
Displaying a list of images in an Ext.dataview.List based on a field value, while still displaying a default image if none is provided.
outside the interface you can just include something like this
var tpl = new Ext.XTemplate(
'<img class="photo" src="{ImageName:this.transformImage}" />',
{transformImage: function(value){return Ext.isEmpty(value) ? 'placeholder.jpg' : value;}
)
but inside the interface anything pasted into the field is scrubbed for quotes and other characters.