How to build a custom menu

My site has many pages, but I don’t want all the pages on the menu. In fact, because of how Grav handles its URLs, and because the site already exists in one form, I think I have to use a custom menu.

But I’m open to advice.

Problem: The entire site of about 100 pages (and roughly 600-700 blog posts) was originally in the form of a flat HTML site, so every single page is of the form: It was later ported to Wordpress and through customized URLs, I was able to maintain that.

Possible solution: Put all the pages at the BASE level, append the “.html” text to the end of them via settings, and use a custom 3-level menu to suggest hierarchy (instead of page folder location).

In WordPress, making a custom menu is easy.

But I can’t q-u-i-t-e find how to do that on Grav.

I presume it’s part of a template or site settings somewhere.

It would be of the form similar to:

Page A (maps to a.html)
Page A-1 (maps to b.html)
Page B (maps to c.html)
Page B-1 (maps to d.html)
Page B-1-a (maps to e.html)
Page B-1-b (maps to f.html)
Page B-2 (maps to g.html)
Page C (maps to h.html)
Page C-1 (maps to i.html)
Page C-2 (maps to j.html)

(I’m still new, but trying!)

You can set to visible only the pages that you want to appear in the menu.

As an extreme case, you can also hardcode the menu in your template’s navigation.html.twig - creating a child theme if you have special needs.

It’s more than a case of whether or not pages appear. All 60-70 pages will be at the base level (so I don’t have to have more complicated URLs), but I want the menu to be customized and three levels deep.

So, in the example I gave above, a.html through j.html are simply pages, and the menu slugs are hierarchical even though the pages aren’t.

Okay, I was able to build a child theme and add a custom menu by modifying CustomTheme/templates/partials/navigation.html.twig.

Thanks for the hint, flaviocopes, that has made my navigation a ton easier (although page management will be a bitch, but that’s just what I’m gonna have to do.

Now if only I could get Grav to recognize mixed case in menu URLs (the existing URLS are of the form Books.html, but Grav seems to be only able to let me use books.html), then I wouldn’t even have to build a server-side redirect!