This commit is contained in:
Luc Didry 2015-10-10 23:02:52 +02:00 committed by Luc Didry
parent 0c560221c8
commit dab5784800
1 changed files with 4 additions and 1 deletions

View File

@ -29,12 +29,15 @@ sub startup {
die "You need to provide a contact information in lufi.conf!" unless (defined($self->config('contact')));
# Themes handling
shift @{$self->app->renderer->paths};
shift @{$self->renderer->paths};
shift @{$self->static->paths};
if ($config->{theme} ne 'default') {
my $theme = $self->home->rel_dir('themes/'.$config->{theme});
push @{$self->renderer->paths}, $theme.'/templates' if -d $theme.'/templates';
push @{$self->static->paths}, $theme.'/public' if -d $theme.'/public';
}
push @{$self->renderer->paths}, $self->home->rel_dir('themes/default/templates');
push @{$self->static->paths}, $self->home->rel_dir('themes/default/public');
# Mail config
my $mail_config = {