-
28 Sep 2012 3:57 PM #1
Answered: Tpl not working
Answered: Tpl not working
I have been having this issue for a while now, which is my tpl on my main view. It won't show anything that I put in it. But I have another Tpl and an itemTpl on 2 other views and they work. Please help!
Code:items: [ { xtype: 'container', height: 285, itemId: 'TopStory', margin: '2px 2px 0px 2px', tpl: [ '<img src="http://www.w3schools.com/images/w3schoolslogo.gif" />{title}' ], width: 314 }
-
Best Answer Posted by haduki
Have you read doc?
tpl : String/String[]/Ext.Template[]/Ext.XTemplate[]A String, Ext.Template, Ext.XTemplate or an Array of strings to form an Ext.XTemplate. Used in conjunction with the data and tplWriteMode configurations.
Note The "data" configuration must be set for any content to be shown in the component when using this configuration.
Code:{ xtype: 'container', height: 285, itemId: 'TopStory', margin: '2px 2px 0px 2px', tpl: [ '<img src="http://www.w3schools.com/images/w3schoolslogo.gif" />{title}' ], width: 314, data:{title:"show your title here"} }
-
29 Sep 2012 8:23 AM #2
Have you read doc?
tpl : String/String[]/Ext.Template[]/Ext.XTemplate[]A String, Ext.Template, Ext.XTemplate or an Array of strings to form an Ext.XTemplate. Used in conjunction with the data and tplWriteMode configurations.
Note The "data" configuration must be set for any content to be shown in the component when using this configuration.
Code:{ xtype: 'container', height: 285, itemId: 'TopStory', margin: '2px 2px 0px 2px', tpl: [ '<img src="http://www.w3schools.com/images/w3schoolslogo.gif" />{title}' ], width: 314, data:{title:"show your title here"} }I write English by translator.


Reply With Quote