Recursion
When different pages with children have the same title, references to parents have to be disambiguated by adding grand_parent
, ancestor
and/or section
fields.
The navigation hierarchy provided by Just the Docs was originally limited to three levels, and disambiguation using grand_parent
was sufficient. It can be tested in a 3-level hierarchy.
Notes explains the background and implementation of the current proposal for recursive navigation.
The following pages test disambiguation using ancestor
and/or section
fields.
Some of the descendants of both Page X and Page Y have the same titles, so references to those descendants as parent
always require disambiguation.
- X is the top page of a section with
section_id: x
. Section names can be strings or numbers, and are independent of titles of pages or file names. - S is the only child of X. The reference to X is unambiguous.
- T is the only child of S. Its
parent
is disambiguated by itssection
U is the only child of T. Its
parent
is disambiguated by either itssection
or itsancestor
.- Y does not have a section name.
- S is the only child of Y. The reference to Y is unambiguous.
- T is the only child of S. Its
parent
is disambiguated by itsancestor
- U is the only child of T. Its
parent
is disambiguated by itsancestor
.