Next.js Discord

Discord Forum

Question

Answered
Samir posted this in #help-forum
Open in Discord
Any way to force a page not to use parent's layout?
Answered by Giant Angora
You can use Route Group for this so you would end up with something like this:

dashboard/(shared)/layout.tsx
dashboard/(standalone)/profile/layout.tsx
dashboard/(standalone)/profile/page.tsx
View full answer

3 Replies

I have
dashboard/layout.tsx
dashboard/profile/page.tsx -> I don't want it to have layout from parent
Giant Angora
You can use Route Group for this so you would end up with something like this:

dashboard/(shared)/layout.tsx
dashboard/(standalone)/profile/layout.tsx
dashboard/(standalone)/profile/page.tsx
Answer
oh thanks! It worked