diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-07 22:28:21 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-14 14:22:24 +0100 |
commit | 6f23d7b44ddc2556897e920cb88a3c81357605bf (patch) | |
tree | 48be64c12f96048a5df42888f34b0ada91d98a69 /perllib/FixMyStreet/App.pm | |
parent | 863e8b2d548d95b89da068bd3361ce8131f77f55 (diff) |
Allow static home page template override.
If an /about/homepage.html template exists in your cobrand, it
will be used as the front page, and the normal front page will
be available at /report.
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r-- | perllib/FixMyStreet/App.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 35e8c2537..5575d915e 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -200,6 +200,10 @@ sub setup_request { $c->stash->{site_name} = Utils::trim_text($c->render_fragment('site-name.html')); + if (my $template = $c->forward('/about/find_template', [ 'homepage' ])) { + $c->stash->{homepage_template} = $template; + } + $c->model('DB::Problem')->set_restriction( $cobrand->site_key() ); Memcached::set_namespace( FixMyStreet->config('FMS_DB_NAME') . ":" ); |