Skip to content

Instantly share code, notes, and snippets.

@nelstrom
Created October 22, 2010 19:08
Show Gist options
  • Save nelstrom/641180 to your computer and use it in GitHub Desktop.
Save nelstrom/641180 to your computer and use it in GitHub Desktop.
landscapeProductTpl: new Ext.XTemplate(
'<div class="productlist-container">',
'<tpl for=".">',
'<span>{price:this.renderPrice} - {retailer}</span>',
'</tpl>',
'</div>',
renderPrice: function(price, values) {
var salePrice = values.salePrice;
if (salePrice) {
return '<del>' + values.priceLabel + '</del> ' + values.salePriceLabel;
} else {
return values.priceLabel;
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment