filter:templates.get_config, allows you to modify template config

as found here
https://github.com/NodeBB/nodebb-theme-vanilla/blob/master/templates/config.json
@Schamper
v1.18.x
psychobunny 11 years ago
parent a880ac6e9f
commit d4dc716acd

@ -150,7 +150,10 @@ function getTemplatesListing(req, res, next) {
plugins.fireHook('filter:templates.get_virtual', [], next);
},
config: function(next) {
fs.readFile(path.join(nconf.get('views_dir'), 'config.json'), next);
fs.readFile(path.join(nconf.get('views_dir'), 'config.json'), function(err, config) {
config = JSON.parse(config.toString());
plugins.fireHook('filter:templates.get_config', config, next);
});
},
}, function(err, results) {
if (err) {

Loading…
Cancel
Save