documentation/extensions/odoo_theme
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
..
layout_templates [FIX] theme: improve search bar implementation and behavior 2021-05-12 09:49:55 +02:00
static [FIX] theme: improve search bar implementation and behavior 2021-05-12 09:49:55 +02:00
__init__.py [FIX] odoo_theme: unclickable :show-content: pages in global toctree 2021-05-25 14:13:01 +02:00
layout.html [FIX] theme: improve search bar implementation and behavior 2021-05-12 09:49:55 +02:00
pygments_override.py [REF][MOV] documentation apocalypse 2021-05-04 15:44:00 +02:00
search.html [REF][MOV] documentation apocalypse 2021-05-04 15:44:00 +02:00
theme.conf [REF][MOV] documentation apocalypse 2021-05-04 15:44:00 +02:00
translator.py [REF][MOV] documentation apocalypse 2021-05-04 15:44:00 +02:00