Install correct template path when site_local_files enabled

This commit is contained in:
Oliver Gorwits
2018-01-05 14:57:47 +00:00
parent 0cb3b491ff
commit 0f81a9368d
2 changed files with 6 additions and 3 deletions

View File

@@ -55,9 +55,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')) {
push @{setting('template_paths')},
dir(($ENV{NETDISCO_HOME} || $ENV{HOME}), 'nd-site-local', 'share')->stringify
if (setting('site_local_files'));
if (setting('site_local_files')) {
push @{setting('template_paths')},
dir(($ENV{NETDISCO_HOME} || $ENV{HOME}), 'nd-site-local', 'share')->stringify,
dir(($ENV{NETDISCO_HOME} || $ENV{HOME}), 'nd-site-local', 'share', 'views')->stringify;
}
unshift @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} },
@{setting('template_paths')};
}