Struggling to create deeply nested menu

I'm new to Prismic and see that this topic has been mentioned a couple of years ago in the Forum but those posts are using an old API and are no longer relevant.

I'm trying to create a deeply-nested navigation menu with the structure

  • Main section Link
    • child link
      • nested child link

I cannot see how this is possible to do as you cannot have a repeatable zone within a repeatable zone.

I followed this guide but it didn't help me with the nested child link part: Create Navigation Menus with Next.js - Documentation - Prismic

I think this is a really common use-case and it's disappointing that your documentation doesn't even mention that.

It's true that it's not possible to have a repeatable zone within a repeatable zone. Instead of having this structure, you need to use Content Relationship fields to represent your nested navigation structure.

You can define the main section links as individual documents and use the Content Relationship field to create the associations between the main section and its child links, and then use the Route Resolver in your project code to create the URLs