Merge pull request #2706 from acardinale/master

Add hooks "filter:topic.build" and "filter:category.build"
This commit is contained in:
Barış Soner Uşaklı
2015-02-18 10:48:05 -05:00
2 changed files with 13 additions and 2 deletions

View File

@@ -333,7 +333,12 @@ categoriesController.get = function(req, res, next) {
res.locals.linkTags.push(rel);
});
res.render('category', data);
plugins.fireHook('filter:category.build', {req: req, res: res, templateData: data}, function(err, data) {
if (err) {
return next(err);
}
res.render('category', data.templateData);
});
});
};