Using XTemplate for advanced templating

Conceptually, XTemplate provides similar functionality to that which Template provides. However, it also provides certain advanced functionalities to work with the template and its data quickly. This recipe describes the use of XTemplate and demonstrates the difference between XTemplate and Template.

Getting ready

Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.

How to do it...

Carry out the following steps:

  1. Create and open a new file named ch04_02.js and paste the following code into it:
    Ext.setup({ onReady: function() { var data = [{ album:'rose', url:'http://www.pictures.vg/vgflowers/400x300/flowers_pics_4870.jpg', title:'Rose 1', about:'Peach'}, … ...

Get Sencha Touch Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.