In the Ext JS library, we have two types of templates: Ext.Template
and Ext.XTemplate
. Let's see what the main differences between these two classes are:
Let's look an example of Ext.Template
:
Ext.onReady(function(){ Ext.tip.QuickTipManager.init(); var myTemplate = new Ext.Template([ //Step 1 '<div class="container">','<div class="header">', '<img src="images/{logo}"width="88" height="53" alt=""/>', '<span>{titlecontents}</span><br>','</div>', '<div class="bookscontainer">','<span class="book">', '<img src="images/{book_a}" width="112" height="138" alt="" data-qtitle="Hot book" data-qtip="This is another great book for EXT JS!" />', '</span>','<span class="book">...