Threaded View

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    39
    Vote Rating
    5
    Answers
    1
    Zachary1748 is on a distinguished road

      0  

    Default 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
                        }

  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"}
                        }

Thread Participants: 1

Tags for this Thread