Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

layout support

  • Loading branch information...
commit fb7a4d07ea715d3037449ee22e53356329be7d92 1 parent f9d461d
Paulius Uza pauliusuza authored

Showing 1 changed file with 9 additions and 8 deletions. Show diff stats Hide diff stats

  1. +9 8 lib/view.js
17 lib/view.js
@@ -57,19 +57,20 @@ var View = Class.create ({
57 57 * @param {Function} fn
58 58 * @api private
59 59 */
60   -
61   - ,renderHelper: function(path, options) {
62   - this.engine(path, options, function(err, res) {
63   - return res;
64   - });
65   - }
66   -
  60 +
67 61 ,render: function(options, fn){
68 62 var self = this;
69 63 this.engine(this.path, options, function(err, res) {
70   - options.render = self.renderHelper;
  64 +
  65 + options.render = function(path, options) {
  66 + self.engine(path, options, function(err, res) {
  67 + return res;
  68 + });
  69 + };
  70 +
71 71 var layout = options.layout || self.defaultLayout;
72 72 var extension = options.engine || self.defaultEngine;
  73 +
73 74 if(layout != false) {
74 75 options.body = res;
75 76 self.engine(options.settings.views+'/'+layout+'.'+extension, options, fn);

0 comments on commit fb7a4d0

Please sign in to comment.
Something went wrong with that request. Please try again.