#Nested dynamic routes

16 messages · Page 1 of 1 (latest)

lapis matrix
#

In order to create nested dynamic routes within app router, are we still forced to creating a route group first, and then each link being it's own page inside of that?

currently have a project structure where I require the following:

/case-study/{slug} and /case-study/{industry}/{slug}

ember elkBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

scenic quartz
#

sorry for the intends it's a bit fucked i did it by hand like a maniac

lapis matrix
scenic quartz
#

i mean you can also catch all like you did it with the ...
Hmm you got me thinking why I would got with my approach.
Don't want to say anything wrong i gonna research this

lapis matrix
scenic quartz
#

in your example
/case-study/{slug} and /case-study/{industry}/{slug}

How do you know that left side {slug} is not a {industry} ?
Let's say case-study/banking
Banking being an industry logically speaking.
Assuming beacuse its just 1 segment?
So case-study/banking/bank-of-england should trigger the right side?

#

Does that mean that case-study/bank-of-england must exist too though? Are these two {slugs} connected? Is what i am trying to ask

lapis matrix
#

so the idea would be /case-study/c/{banking} however, doesn't seem like you can do multiple dynamic routes without route groups

scenic quartz
#

Hm yea i tried to come up with something but I can't. Pretty sure you are right. I would not even have thought of route groups for this as a solution.
I came here with the intention to help but today sir you helped my understanding

lapis matrix
scenic quartz
#

Lets see if one of the veterans joins this thread and might have something we both didnt think of

lapis matrix
scenic quartz