Remove root layout for a specific path
Answered
Hunting wasp posted this in #help-forum
Hunting waspOP
Basically the title.
I am creating a webapp using nextjs14 with app routing and at some point I need to open a component in a new window by itself, without the layout of the whole app (navbar basically).
So the idea was to create a new path, that contains his own layout and page, the things is that I have the navbar in the root layout and it's automatically applied to this new path, there is a way to remove this just for this page.tsx file?
I am creating a webapp using nextjs14 with app routing and at some point I need to open a component in a new window by itself, without the layout of the whole app (navbar basically).
So the idea was to create a new path, that contains his own layout and page, the things is that I have the navbar in the root layout and it's automatically applied to this new path, there is a way to remove this just for this page.tsx file?
4 Replies
@Clown You need to use route groups
Hunting waspOP
Thank you this is what I was looking for!
@Hunting wasp Thank you this is what I was looking for!
Please mark the answer if its solved 🙂