Hybrid View
-
25 Sep 2012 12:42 PM #1
Unanswered: How to concatenate an Ext.JS method inside a tpl string?
Unanswered: How to concatenate an Ext.JS method inside a tpl string?
I would like to use Ext's String method on some text that will be output to the view.
For example:
but of course the concatenation in line 10 is illegal.Code:itemTpl: [ ... '<tpl switch="post_type">', '<tpl case="new_user">', '<p>{post_text_teaser}</p>', '<p>{timestamp}</p>', '<tpl default>', '<p>' + Ext.String.ellipsis( + '{post_text_teaser}' + \, 4) + '</p>', ... ].join(''),
Do you know if it's possible or how to do this correctly?
-
25 Sep 2012 5:21 PM #2
pls,get more info from ext doc.Code:itemTpl: [ ... '<tpl switch="post_type">', '<tpl case="new_user">', '<p>{post_text_teaser}</p>', '<p>{timestamp}</p>', '<tpl default>', '<p>{[Ext.String.ellipsis(values.post_text_teaser,4)]}</p>', ... ].join(''),I write English by translator.


Reply With Quote