Quetion on route group Nextjs
Answered
Ragdoll posted this in #help-forum
RagdollOP
I added to 2 groups and added 2 layouts to each group to test out how layouts uniqely works for each group. Here is the code https://gitlab.com/aruprakshit/next-app-router/-/tree/main/app/posts?ref_type=heads
Show page layout not applying its background. Not sure where is it wrong
Show page layout not applying its background. Not sure where is it wrong
Answered by Ragdoll
I fixed it. folder was not inside the group.. so it was the reason
21 Replies
@Ragdoll I added to 2 groups and added 2 layouts to each group to test out how layouts uniqely works for each group. Here is the code https://gitlab.com/aruprakshit/next-app-router/-/tree/main/app/posts?ref_type=heads
Show page layout not applying its background. Not sure where is it wrong
what do you mean by Show page layout ?
RagdollOP
I fixed it. folder was not inside the group.. so it was the reason
Answer
RagdollOP
[id] was outside of group2 https://gitlab.com/aruprakshit/next-app-router/-/tree/main/app/posts?ref_type=headsin my VSCODE it was not visible clearly like it is in the gitlab
RagdollOP
@Ray I have one question
sure
RagdollOP
https://nextjs.org/docs/app/building-your-application/configuring/src-directory says
>> src/app or src/pages will be ignored if app or pages are present in the root directory.
Does it mean if I have src/pages then app from root folder willl be ignored or only /pages will be ignored?
>> src/app or src/pages will be ignored if app or pages are present in the root directory.
Does it mean if I have src/pages then app from root folder willl be ignored or only /pages will be ignored?
@Ragdoll https://nextjs.org/docs/app/building-your-application/configuring/src-directory says
>> src/app or src/pages will be ignored if app or pages are present in the root directory.
Does it mean if I have src/pages then app from root folder willl be ignored or only /pages will be ignored?
no if you use
src folder and you have app or pages on the root, the one inside src will be ignoredRagdollOP
ok means if I have app in the root, and also in src/ folder along with pages, then app from src folder will be ignored, but not pages right?
well I have never tried it lol
either use src or not to use
RagdollOP
hm. I am kind confused with the doc line as I see in our project app presents in root and pages inside the src
just create a page inside
src/pagesand see if it works
RagdollOP
it works
but I guess it does not
lol
RagdollOP
haha
thanks for telling me this
but I would suggest don't mix with it, either use or not to use it