Add custom templates to /api/get_templates_listing

This commit is contained in:
MrWaffle
2014-01-25 23:13:51 +01:00
parent 2e786cc4d1
commit 869f9e0d86
2 changed files with 9 additions and 1 deletions

View File

@@ -877,6 +877,12 @@ module.exports.server = server;
'templates': []
};
app.get_custom_templates = function() {
return custom_routes.templates.map(function(tpl) {
return tpl.template.split('.tpl')[0];
});
}
plugins.ready(function() {
plugins.fireHook('filter:server.create_routes', custom_routes, function(err, custom_routes) {
var routes = custom_routes.routes;