From 1da5b2ca3445da19c58acc66d546cb677b263f36 Mon Sep 17 00:00:00 2001 From: jsdream Date: Fri, 31 Jul 2015 16:51:55 +0300 Subject: [PATCH] Add 'filter:recent.build' hook --- src/controllers/categories.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/categories.js b/src/controllers/categories.js index fe44af90a8..86ff0c69c4 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -26,7 +26,13 @@ categoriesController.recent = function(req, res, next) { data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1; data.rssFeedUrl = nconf.get('relative_path') + '/recent.rss'; data.breadcrumbs = helpers.buildBreadcrumbs([{text: '[[recent:title]]'}]); - res.render('recent', data); + + plugins.fireHook('filter:recent.build', {req: req, res: res, templateData: data}, function(err, data) { + if (err) { + return next(err); + } + res.render('recent', data.templateData); + }); }); };