_.extend(Marionette.TemplateCache.prototype, { loadTemplate: function (templateId) { var template; console.log("Loading template '" + templateId + "'"); jQuery.ajax({ url: '_backboneApp//' + templateId + '.html', async: false }).done(function (data) { template = data; }).fail(function (data) { console.log("couldn't load template " + this.templateId + " Error: " + data.statusText); template = "
Couldn't load template '" + templateId + "'. Status: " + data.statusText + "
"; }); return template; } }); _.extend(Marionette.View.prototype, { });