Merge pull request #2706 from acardinale/master

Add hooks "filter:topic.build" and "filter:category.build"
v1.18.x
Barış Soner Uşaklı 10 years ago
commit dca143fd87

@ -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);
});
});
};

@ -266,7 +266,13 @@ topicsController.get = function(req, res, next) {
});
topics.increaseViewCount(tid);
res.render('topic', data);
plugins.fireHook('filter:topic.build', {req: req, res: res, templateData: data}, function(err, data) {
if (err) {
return next(err);
}
res.render('topic', data.templateData);
});
});
};

Loading…
Cancel
Save