title: How to call other view in Sencha Touch
body: <p>How can I call a new view on image tap which is defined in tpl.</p>
  
  <p>Code:</p>
  
  <pre><code>tpl: Ext.create('Ext.XTemplate','&lt;tpl for="sample"&gt;',
             '&lt;div&gt; {tittle}&lt;/div&gt;
      &lt;div&gt;&lt;a href="{link}"&gt;&lt;img src="{photo}"/&gt;&lt;/a&gt;&lt;/div&gt;',
              '&lt;/tpl&gt;', 
  </code></pre>
  
  <p>/////////////////////////////////////////</p>
  
  <p>After your directions, I'm sure I have something wrong. I just want to know how to link an image to puncture it take you to another view. Let me explain better? 
  Thank you very much for your time and dedication.</p>
  
  <p>//MyController</p>
  
  <pre><code>Ext.define('DemoApp.controller.ControllerR', {
      extend: 'Ext.app.Controller',
          config: {
          refs: {
              res: 'res',
  
          },
          control: {
              'rest list': {
                  itemtap: 'showR' },
  
  
          }
      },
  
            onCreateNewView: function() {
     if(document.getElementById('something')) {
        Ext.Viewport.setActiveItem(Ext.create('DemoApp.view.DetalTwo'));
     }
  }, 
  
  
  });
  </code></pre>
  
  <p>//My Template</p>
  
  <pre><code>Ext.define('DemoApp.view.ViewR', {
      extend: 'Ext.Panel',
      xtype: 'res',
      config: {
          title: 'Res',
          iconCls: 'info',
          scrollable: true,
          data: {
              res: [ model: 'DemoApp.model.ModelR',
                     autoLoad: true,
                     storeId: 'resStore',
          proxy: {
              type: 'ajax',
             url: 'data/res.json',
               reader: {
  
                  type: 'json',
                  rootProperty:'wha.res'     
  
              }
          }]
  
  
          },
         tpl: Ext.create('Ext.XTemplate','&lt;tpl for="sample"&gt;',
             '&lt;div&gt; {tittle}&lt;/div&gt;
      &lt;div&gt;&lt;img id="something "src="{photo}"/&gt;&lt;/div&gt;',
              '&lt;/tpl&gt;', 
              {
                  join: function(value) {
                      return value.join(', ');
                  }
              })
      }
  });
  </code></pre>