diff options
| author | Benjamin Vray <bvr@odoo.com> | 2019-11-13 14:49:10 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-03-31 18:16:08 +0000 |
| commit | 5ba817c453270fa8366397f9767d79072054df20 (patch) | |
| tree | ab42fd89ebb1f1f1a44b92a03fff985553867a2b /addons/website/controllers | |
| parent | cb20435069717ec11a515d9ea64d280a2ac6d564 (diff) | |
[IMP] website: add templates for footer
Also remove all t-fields from footers to have only static contents in
footers. For social links, a controller is added so that a "static url"
/website/social/xxx always redirect to the correct set URL for the given
xxx social network.
Part of https://github.com/odoo/odoo/pull/38950
task-2087641
Co-authored-by: qsm-odoo <qsm@odoo.com>
Diffstat (limited to 'addons/website/controllers')
| -rw-r--r-- | addons/website/controllers/main.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index 49f935e4cc3..9cc42507c92 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -218,6 +218,13 @@ class Website(Home): } return request.render('website.website_info', values) + @http.route(['/website/social/<string:social>'], type='http', auth="public", website=True, sitemap=False) + def social(self, social, **kwargs): + url = getattr(request.website, 'social_%s' % social, False) + if not url: + raise werkzeug.exceptions.NotFound() + return request.redirect(url) + # ------------------------------------------------------ # Edit # ------------------------------------------------------ |
