Layouts
Answered
Shaurya posted this in #help-forum
![Avatar](https://cdn.discordapp.com/avatars/893705256368750592/d371def1a743b93f7417007b3e298cfc.webp?size=256)
ShauryaOP
I have a layout which have nav and stuff but I don't want the layout to the login page, how would I do that?
Answered by averydelusionalperson
18 Replies
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/281897fc3e3e794972f5dfe232f998eb.webp?size=256)
ahh, use route groups
![Avatar](https://cdn.discordapp.com/avatars/893705256368750592/d371def1a743b93f7417007b3e298cfc.webp?size=256)
@Shaurya I have a layout which have nav and stuff but I don't want the layout to the login page, how would I do that?
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
use route group
(with-nav)/layout.tsx <-- render Nav here
(with-nav)/page.tsx
/login/page.tsx
(with-nav)/layout.tsx <-- render Nav here
(with-nav)/page.tsx
/login/page.tsx
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
@Ray use route group
(with-nav)/layout.tsx <-- render Nav here
(with-nav)/page.tsx
/login/page.tsx
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/281897fc3e3e794972f5dfe232f998eb.webp?size=256)
shouldn't there be two different route gruops? (with-nav) & (without-nav)?
oh
got it
nvm
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/281897fc3e3e794972f5dfe232f998eb.webp?size=256)
@averydelusionalperson shouldn't there be two different route gruops? (with-nav) & (without-nav)?
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
the default one without nav lol
![Avatar](https://cdn.discordapp.com/avatars/893705256368750592/d371def1a743b93f7417007b3e298cfc.webp?size=256)
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
@Ray the default one without nav lol
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/281897fc3e3e794972f5dfe232f998eb.webp?size=256)
yeah, got confused, I read it like
(with-nav)/page.tsx/login/page.tsx
instead of seperate lines![Avatar](https://cdn.discordapp.com/avatars/893705256368750592/d371def1a743b93f7417007b3e298cfc.webp?size=256)
@Shaurya can you please elaborate, didn't understand
this is my structure
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/281897fc3e3e794972f5dfe232f998eb.webp?size=256)
create a folder named
(with-nav)
, and in that keep your pages with nav bar, and layout with navbar, and outside of that folder keep other pages without those nav bar.Answer
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/281897fc3e3e794972f5dfe232f998eb.webp?size=256)
checkout docs here
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/281897fc3e3e794972f5dfe232f998eb.webp?size=256)
@averydelusionalperson create a folder named `(with-nav)`, and in that keep your pages with nav bar, and layout with navbar, and outside of that folder keep other pages without those nav bar.
![Avatar](https://cdn.discordapp.com/avatars/893705256368750592/d371def1a743b93f7417007b3e298cfc.webp?size=256)
ShauryaOP
so the home page
/app/page.tsx
would be /app/withnav/page.tsx
right?oh
the parentheses
got it, lemme do that
![Avatar](https://cdn.discordapp.com/avatars/1011594178934878248/281897fc3e3e794972f5dfe232f998eb.webp?size=256)
![Avatar](https://cdn.discordapp.com/avatars/893705256368750592/d371def1a743b93f7417007b3e298cfc.webp?size=256)
ShauryaOP
thanks, works perfect, didn't have use of routing groups before