Just a thing I try to do that would really simplify my life right now.
How can I do that :
This is my view in app file
window.ArtView = B
I believe you can call functions within the template as long as the object for the template has the function.
render:function (eventName) {
var output="blablbla";
var data = _.extend({"output":output}, callFunction);
$(this.el).html(this.template(data));
return this;
}
then in your template:
<%= callFunction() %>