Next.js Discord

Discord Forum

Accessing nested parallel route from parent.

Unanswered
Silver Marten posted this in #help-forum
Open in Discord
Silver MartenOP
Hi! I have a layout at [id]/layout.tsx which shows the @tabs based on the URL, so /[id]/software loads the @tabs/software/page.tsx content. I also use @dialog co-located with different folders such as [id]/@tabs/software/@dialog/add/page.tsx so I have a dialog in /[id]/software/add.

That all works great because dialogs only need to be accessed in the nested layout (i.e, /software/layout.tsx)

But each page has its own set of buttons I want to change. To do that I really need to be able to handle it from [id]/layout.tsx but it would make a lot more sense for this parallel route to be co-located.

I tried to use Intercepting Routes but there was no luck there either. Am I going about this wrong way?

0 Replies