View Full Version : Does DataView have outterTpl like itemTpl to wrap records?

4 Feb 2012, 3:05 PM
I am trying to wrap my DataView records, but cannot achieve this. This is what I am trying:

xtype: 'dataview',
store: 'Contacts',
itemTpl: [
'<div class="list-holder">',
'<tpl for=".">',
'<a href="#"><img src="{ImageURL}" alt="{FirstName} {LastName}"></a>',

The above gets rendered for every record. I thought <tpl for...> was where the loop started. Is it possible to pass an outter wrapper for my DataView items?

4 Feb 2012, 3:31 PM
Just use the tpl option, itemTpl is only there if you only want to specify the inner part.

There's an example in the docs.

15 May 2012, 5:51 PM
i use the tpl option,but the dataview still show the itemTpl. and where the example you said is. thank you:)

15 May 2012, 5:52 PM
do you solve the question? and if you do ,can you share the answer