Last active
May 21, 2016 15:17
-
-
Save vernondegoede/54ddf78e41de5c44e543 to your computer and use it in GitHub Desktop.
TemplateHelper in CompositeView
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
Single.ProductItemView = Marionette.CompositeView.extend({ | |
templateHelpers: function () { | |
return { | |
image: function () { | |
var image = this.model.getPreviewImage(); | |
if (image) { | |
return image.get('large_url'); | |
} | |
return ""; | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment