code: function(el) {
              var that = this;
              var d = Q.defer();
  
              if (this.view != null) el = el || this.view.$el;
              this.on("loaded", function() {
                  if (this.content == null) return;
                  if (this.view != null) this.view.clearComponents();
                  this.generate(this.args).then(function(content) {
                      el.html(content);
                      if (that.view != null) that.view.renderComponents();
                      that.trigger("updated");
                      d.resolve(el);
                  }, function(err) {
                      logging.exception(err, "Error with template:");
                      d.reject(err);
                  });
                  
              }, this);
              this.load();
  
              return d.promise;
          }
docs: /*
  Render template