Add 'filter:middleware.renderHeader' hook

v1.18.x
jsdream 10 years ago
parent ee9390ee34
commit 29fcbf6750

@ -286,7 +286,9 @@ middleware.renderHeader = function(req, res, callback) {
templateValues.template = {name: res.locals.template}; templateValues.template = {name: res.locals.template};
templateValues.template[res.locals.template] = true; 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); middleware.admin = require('./admin')(webserver);
return middleware; return middleware;
}; };

Loading…
Cancel
Save