How to create page-unrelated multi-level menus?

Something like this in configs, the top menu do not relate to any pages, the submenu would be some standalone page or a simple link.

[[menu.main]]                       
  name = "File"
  weight = 10
    [[menu.main.submenu]]
            name = "New File"
            weight = 10
            identifier = "archive"
            url = "/posts/"
[[menu.main]]                       
  name = "Edit"
  weight = 10
    [[menu.main.submenu]]
            name = "Undo"
            weight = 10
            identifier = "archive"
            url = "/posts/"

Is there a method to read and iterate these settings? I also tried with params, both didn’t work.

You can use the parent field. See docs.

The parent identifier reference works in config.toml as well.

There are several existing answers with examples here if you search.

This is a recent one

Thanks, now it works.