My store look like bellow
var store_ = new Ext.data.JsonStore({
mode: 'local',
data: <?php echo $data ?>,
fields: [
'THUMBNAIL_SRC',
'NAME',
'REF_ID',
'URL']
});
I have another XTemplate code as bellow
var tpl = new Ext.XTemplate(
'<tpl for=".">',
'<div class="thumb-wrap" id="{NAME}">',
'<div class="thumb-inner"><div class="thumb-left"> </div>',
'<div class="thumb">',
'<tpl if="(THUMBNAIL_SRC === \'\')">',
'<img src="<?php echo BASE_DOMAIN ?>ddd" title="{NAME}">',
'<tpl else>',
'<img src="<?php echo BASE_DOMAIN ?>aa{THUMBNAIL_SRC}" title="{NAME}">',
'</tpl>',
'</div></div>',
'<span class="x-editable -landing">{NAME}</span></div>',
'</tpl>',
'<div class="x-clear"></div>'
);
what i need in my XTemplate
WHEN store_.THUMBNAIL_SRC = '' THEN ddd image want to view ELSE THUMBNAIL_SRC
image want to view END;
this is my basic logic for XTemplate but event time gave to me error as THUMBNAIL_SRC
not defined i can't imagine what is the problem in my XTemplate please help
Aucun commentaire:
Enregistrer un commentaire