diff options
-rw-r--r-- | perllib/FixMyStreet/App.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Base.pm | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 18cad6b89..0582d88c9 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -151,8 +151,7 @@ sub setup_request { my $cobrand = $c->cobrand; # append the cobrand templates to the include path - $c->stash->{additional_template_paths} = - [ $cobrand->path_to_web_templates->stringify ] + $c->stash->{additional_template_paths} = $cobrand->path_to_web_templates unless $cobrand->is_default; # work out which language to use @@ -411,7 +410,7 @@ call), use this method. sub render_fragment { my ($c, $template, $vars) = @_; - $vars->{additional_template_paths} = [ $c->cobrand->path_to_web_templates->stringify ] + $vars->{additional_template_paths} = $c->cobrand->path_to_web_templates if $vars && !$c->cobrand->is_default; $c->view('Web')->render($c, $template, $vars); } diff --git a/perllib/FixMyStreet/Cobrand/Base.pm b/perllib/FixMyStreet/Cobrand/Base.pm index 42a891cb4..fada33b78 100644 --- a/perllib/FixMyStreet/Cobrand/Base.pm +++ b/perllib/FixMyStreet/Cobrand/Base.pm @@ -62,7 +62,7 @@ Returns the path to the templates for this cobrand - by default sub path_to_web_templates { my $self = shift; - return FixMyStreet->path_to( 'templates/web', $self->moniker ); + return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ]; } 1; |