Permalink
Browse files

layout support

  • Loading branch information...
1 parent 61253dc commit f9d461d6337faeadc72ff25212942d484d7afcd6 @pauliusuza pauliusuza committed Mar 25, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/view.js
View
@@ -58,9 +58,16 @@ var View = Class.create ({
* @api private
*/
+ ,renderHelper: function(path, options) {
+ this.engine(path, options, function(err, res) {
+ return res;
+ });
+ }
+
,render: function(options, fn){
var self = this;
this.engine(this.path, options, function(err, res) {
+ options.render = self.renderHelper;
var layout = options.layout || self.defaultLayout;
var extension = options.engine || self.defaultEngine;
if(layout != false) {

0 comments on commit f9d461d

Please sign in to comment.