odoo/documentation#2051

Created by fw-bot
Merged at c9d95858b424d6d5dfab63c4f751e95c36e28b47

Statuses:

label
odoo-dev:saas-15.3-13.0-fallback-urls-switcher-mat-hs_f-fw
head
9eef35773315b187e148cdcc5ed7a6f0ab80e1ed
merged
3 years ago by Security, Martin Trigaux (mat)
odoo/documentation
13.0 #1588
14.0 #2042
15.0 #2044
saas-15.1 #2047
saas-15.2 #2049
saas-15.3 #2051
16.0
17.0
18.0
saas-18.2
saas-18.3
saas-18.4
19.0
master #2052

[FW][IMP] odoo_theme: introduce fallback URLs for the page switchers

When a user clicks on the link of an alternate page in the version or
language switcher, we now check if the page referenced by the target URL
exists or not. If not, we generate a series of fallback URLs from the
target URL and check whether the targeted resource exists or not, until
we read the root of the documentation. As soon as we find a valid URL,
we redirect the user to it.

This is inspired by the behaviour of docs.python.org's version and
language switchers.

task-2534669

Forward-Port-Of: #1588