Any way to remove layout for specific page?
Unanswered
Scaly-naped Pigeon posted this in #help-forum
Scaly-naped PigeonOP
/app
(main)
/products
[id]
page.tsx
/stores
[id]
page.tsx
page.tsx
laout.tsxI want to remove the layout for detail page ([id]/page.tsx)
Is there any way??
9 Replies
Siamese Crocodile
you can override the layout by putting a layout.js file in the same folder as the page you want to customize the layout for
add [id]/layout.tsx
That's not very DRY though. Now you have an extra file to maintain.
Siamese Crocodile
yes.
I just solved with adding more re-usable components
That's a good idea.
Scaly-naped PigeonOP
Thankyou for anwser !
I'll try it
I'll try it
i mean you seem to already know about route groups, so just dont include that route in the same group with layout
Ah, that’s true, with his structure there he could do that.