0

I have a app folder like this:

/app
  page.tsx
  layer.tsx ... toplayer 
  /subpge
    page.tsx
    layer.tsx ... sublayer

and I would like to apply sublayer to /subpage/page.tsx without applying toplayer, but I have no idea how to achieve this. Is there any solution for this? Thanks.

c.f.: I naievely tried this solution but it did not work. Next.js 13 - Have different shared layouts

1 Answers1

0

You can create directory with parentheses around to group your routes. Read more at: https://beta.nextjs.org/docs/routing/defining-routes#route-groups

pnxdxt
  • 125
  • 6