documentation/extensions
Victor Feyens 10612f0ba7 [FIX] odoo_theme: unclickable :show-content: pages in global toctree
When navigating the themes tutorial (developer/howto/themes), the
rdtraining page wasn't clickable in the global toc, even though it was
specified as :show-content: (note that the rdtraining is only in 14.0+).

The heuristic extracting the pagename from a toctree node wasn't
considering the current depth if the page referenced by the toctree
node was in the same folder than the current page.

Explanation:

We are computing the toctree for the page developer/howtos/themes. One
of the toctree nodes references the rdtraining page, with a relative
link, i.e. `rdtraining.html`.

We were wrongfully looking for `show_content` in the metadata of the
`rdtraining` page, instead of `developer/howtos/rdtraining`, since we
didn't consider the current document depth when the reference didn't
contain any `/`.

This commit ensures that if the current document has a depth > 1, this
depth is currently considered, even for links referencing documents in
the same folder.

task-2538297
2021-05-25 14:13:01 +02:00
..
autodoc_placeholder [FIX] extensions: support parallel read 2021-05-19 15:03:39 +02:00
embedded_video [FIX] extensions: support parallel read 2021-05-19 15:03:39 +02:00
exercise_admonition [FIX] extensions: support parallel read 2021-05-19 15:03:39 +02:00
github_link [FIX] extensions: support parallel read 2021-05-19 15:03:39 +02:00
html_domain [FIX] extensions: support parallel read 2021-05-19 15:03:39 +02:00
odoo_theme [FIX] odoo_theme: unclickable :show-content: pages in global toctree 2021-05-25 14:13:01 +02:00
redirects [FIX] extensions: support parallel read 2021-05-19 15:03:39 +02:00
switcher [FIX] extensions: support parallel read 2021-05-19 15:03:39 +02:00