Nowkin
22 Mar 2017, 3:17 AM
Hello
i hope that here somebody can help me. The Shopware backend is using extjs 4.1
Here i want to create a custombox with a custom template. I want that each item in the custombox dropdown has his own font-family.
return me.fontField = Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Schriftart',
store: me.createStore(),
queryMode: 'local',
displayField: 'name',
valueField: 'style',
tpl: Ext.create('Ext.XTemplate',
'<tpl for=".">',
'<div class="x-boundlist-item" style="font-family: Arial;">{name}</div>',
'</tpl>'
),
listeners:{
scope: this,
select: me.onFontChange,
}
});
thats the code i am trying currently to use to show at least the name in the combobox item. normally it should work with {name} but i all the time get an error in shopware like this:
Syntax Error in template "/var/www/shop2/engine/Shopware/Plugins/Community/Backend/TBCounterBannerEmotionElement/Views/emotion_components/backend/emotion-components-counter.js" on line 86 "'&lt;div class=&quot;x-boundlist-item&quot; style=&quot;font-family: Indie Flower;&quot;&gt;{name}&lt;/div&gt;'," unknown tag "name" in engine/Library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 657</h3>
i hope somebody can help
kind regards
i hope that here somebody can help me. The Shopware backend is using extjs 4.1
Here i want to create a custombox with a custom template. I want that each item in the custombox dropdown has his own font-family.
return me.fontField = Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Schriftart',
store: me.createStore(),
queryMode: 'local',
displayField: 'name',
valueField: 'style',
tpl: Ext.create('Ext.XTemplate',
'<tpl for=".">',
'<div class="x-boundlist-item" style="font-family: Arial;">{name}</div>',
'</tpl>'
),
listeners:{
scope: this,
select: me.onFontChange,
}
});
thats the code i am trying currently to use to show at least the name in the combobox item. normally it should work with {name} but i all the time get an error in shopware like this:
Syntax Error in template "/var/www/shop2/engine/Shopware/Plugins/Community/Backend/TBCounterBannerEmotionElement/Views/emotion_components/backend/emotion-components-counter.js" on line 86 "'&lt;div class=&quot;x-boundlist-item&quot; style=&quot;font-family: Indie Flower;&quot;&gt;{name}&lt;/div&gt;'," unknown tag "name" in engine/Library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 657</h3>
i hope somebody can help
kind regards