template_paths config to allow easier override of web templates

This commit is contained in:
Oliver Gorwits
2017-05-06 17:59:50 +01:00
parent 273b49b9ce
commit 2c41b2925d
6 changed files with 32 additions and 5 deletions

View File

@@ -56,6 +56,14 @@ if (setting('extra_web_plugins') and ref [] eq ref setting('extra_web_plugins'))
push @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} },
setting('views');
# any template paths in deployment.yml (should override plugins)
if (setting('template_paths') and ref [] eq ref setting('template_paths')) {
foreach my $path (setting('template_paths')) {
unshift @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} },
$path;
}
}
# load cookie key from database
setting('session_cookie_key' => undef);
my $sessions = schema('netdisco')->resultset('Session');