Skip to content
Browse files

templates

  • Loading branch information...
1 parent d134e18 commit 424225cb391c54966e343fed1339510c129332e2 @pauliusuza pauliusuza committed Mar 25, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/cargobox.js
  2. +2 −2 lib/view.js
View
2 lib/cargobox.js
@@ -551,7 +551,7 @@ var CargoBox = (function (){
// view
if (!view) {
view = new View(name, {
- defaultLayout: this.get('layout') || 'layout'
+ defaultLayout: this.get('view layout') || 'layout'
, defaultEngine: this.get('view engine')
, root: this.get('views') || process.cwd() + '/views'
, engines: engines
View
4 lib/view.js
@@ -60,10 +60,10 @@ var View = Class.create ({
,render: function(options, fn){
var self = this;
this.engine(this.path, options, function(err, res) {
- var layout = options.layout || options.settings.defaultLayout;
+ var layout = options.layout || self.defaultLayout;
if(layout != false) {
options.body = res;
- console.log(layout,options);
+ console.log(layout,options,self.defaultLayout);
self.engine(options.settings.views+'/'+layout+'.'+options.settings['view engine'], options, fn);
} else {
fn(err, res);

0 comments on commit 424225c

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