diff --git a/src/BaseController.js b/src/BaseController.js index 4728b89..58a8c32 100644 --- a/src/BaseController.js +++ b/src/BaseController.js @@ -29,8 +29,10 @@ module.exports = Class(function (req, res, next) { } , render: function (view, data, fn) { data = data || {} + layout = data.layout || this.layout + delete data.layout this.response.render(this.viewFolder + view, { - layout: this.layout + layout: layout , locals: data , partials: pr.get(this.viewFolder, app.set('viewPartials')) }, fn)