-
30 Apr 2012 10:10 AM #1
Unanswered: itemSelector for different nodes
Unanswered: itemSelector for different nodes
I am using the widget.dataview where i have two different type of nodes (file-list-item and folder-list-item) and the template goes something like this:
tpl: ['<tpl for=".">',
'<tpl if="folder==false">',
'<div class="file-list-item">{name}</div>',
'</tpl>',
'<tpl if="folder==true">',
'<div class="folder-list-item">{name}</div>',
'</tpl>',
'</tpl>'
This displays fine, but when I go to select each type of node with the item selector defined as :
itemSelector: '.folder-list-item',
it handles the (folder-list-item) fine, but how do i configure the itemSelector to handle both type of nodes???
-
30 Apr 2012 4:22 PM #2
Try this
Code:tpl: [ '<tpl for=".">', '<tpl if="folder==false">', '<div class="node-list-item file-list-item">{name}</div>', '</tpl>', '<tpl if="folder==true">', '<div class="node-list-item folder-list-item">{name}</div>', '</tpl>', '</tpl>'Code:... itemSelector: '.node-list-item' ...


Reply With Quote