3 var Marionette = require('backbone.marionette');
5 //Marionette has not released https://github.com/marionettejs/backbone.marionette/pull/2565
6 //so this is needed JP 17/2/16
7 module.exports = function compositeViewRenderTemplate() {
9 data = this.serializeData();
10 data = this.mixinTemplateHelpers(data);
12 this.triggerMethod('before:render:template');
14 var template = this.getTemplate();
15 if (template !== false) {
16 var html = Marionette.Renderer.render(template, data, this);
17 this.attachElContent(html);
20 // the ui bindings is done here and not at the end of render since they
21 // will not be available until after the model is rendered, but should be
22 // available before the collection is rendered.
23 this.bindUIElements();
24 this.triggerMethod('render:template');