I think of some hard-code in the theme, but I still want to use pages instead to let the person who manages the site can create more sub-menu like this Categories one by using pages an
Thank you! I have tried routing, it works but only solves 50% of the problem. The navigation bar needs to show “men-clothes” instead of “categories/men-clothes”. It seems we really need to hard-code something in the theme?
Could you possibly clarify how these changes might be implemented?
I think i am in a similar boat – with a collection of hierarchical web pages (about 70 or so), but due to a pre-existing structure, my client would prefer all of them have the URL structure: domain/slug.html as opposed to domain/parent/parent/slug.html.
I needed to remove what I didn’t need in the URLs in my theme’s twig fiels. In your case, I remove “parent/parent/”. You also need to override the routes to allow us to go to the correct pages as Hugo mentioned.