Hierarchical Menus

Yes! First part of the puzzle I was able to resolve. The documentation mentions the use of a ‘parent field’, hope this helps someone else as well. This is how I was able to create the parent/child relationship.

config.toml:

[[menu.main]]
name = “Section folder”
identifier = “sect”
url = “/section/”

[[menu.main]]
name = “Sublevel topic”
parent = “sect”
identifier = “sub1”
url = “/section/folder1/”

archetype frontmatter:

+++
[menu]
[menu.main]
parent = “sub1”
+++

It took me a while to understand the physical ordering of my content files in folders have no effect on Menus. A Menu is a flat array of url’s. The fields in the front matter are also no expression of hierarchy, even though it looks like that.

4 Likes