Skip to content

Render menu has off by 1 issue  #803

@jaapio

Description

@jaapio
          The results look great, thanks for this effort Lina! Just tested this PR in my test repository and the maxdepth seems 100% correct now!

I've found one minor error since this PR: the MenuEntryNode::level property seems weirdly inconsistent now.
When rendering the main menu using {{ renderMenu('mainMenu') }} in a template, the first level (document titles at the root) appear to have the level property set to 2 instead of 1.
When rendering a toctree using the directive, it seems like the first level has the property set to 0 instead of 1 (I'm not sure if this always used to be the case).

Originally posted by @wouterj in #799 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions