add site_local_files feature for easy lib/template override

This commit is contained in:
Oliver Gorwits
2017-05-14 21:12:19 +01:00
parent 824ec751e2
commit da04522199
4 changed files with 30 additions and 6 deletions

View File

@@ -58,10 +58,11 @@ push @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} },
# 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;
}
push @{setting('template_paths')},
dir(($ENV{NETDISCO_HOME} || $ENV{HOME}), 'nd-site-local', 'share')->stringify
if (setting('site_local_files'));
unshift @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} },
@{setting('template_paths')};
}
# load cookie key from database