-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
I think what you want to use is https://nextjs.org/docs/app/building-your-application/routing/route-groups, but I couldn't really understand what you asked for. You'd want to group This would make these two routes consume their group root layout, and not the For example, https://stackblitz.com/edit/nextjs-qq5bfcus?file=app%2Flayout.tsx,app%2F(foo)%2Flayout.tsx,app%2Fpage.tsx -- Though I noticed that having a |
Beta Was this translation helpful? Give feedback.
I think what you want to use is https://nextjs.org/docs/app/building-your-application/routing/route-groups, but I couldn't really understand what you asked for. You'd want to group
manage
andpublic
under a route group sayapp/(with-template)
, and createapp/(with-template)/layout.tsx
, and movemanage
andpublic
directories there.This would make these two routes consume their group root layout, and not the
app/layout.tsx
For example, https://stackblitz.com/edit/nextjs-qq5bfcus?file=app%2Flayout.tsx,app%2F(foo)%2Flayout.tsx,app%2Fpage.tsx -- Though I noticed that having a
app/(foo)/public/page.tsx
causes 404's 🤔