Created
October 22, 2010 19:08
-
-
Save nelstrom/641180 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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