diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 77951daf74..08241a7a59 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -286,7 +286,9 @@ middleware.renderHeader = function(req, res, callback) { templateValues.template = {name: res.locals.template}; templateValues.template[res.locals.template] = true; - app.render('header', templateValues, callback); + plugins.fireHook('filter:middleware.renderHeader', {templateValues: templateValues, req: req, res: res}, function(err, data) { + app.render('header', data.templateValues, callback); + }); }); }; @@ -495,4 +497,4 @@ module.exports = function(webserver) { middleware.admin = require('./admin')(webserver); return middleware; -}; \ No newline at end of file +};