Next.js Discord

Discord Forum

dynamic routing

Answered
Spectacled bear posted this in #help-forum
Open in Discord
Avatar
Spectacled bearOP
I'm confused as to how dynamic routing works in Next 13 now. Do I absolutely have to have a folder in order for a page to be dynamic?
I'm working with a headless CMS and some pages will be created at the root. Does this mean I need a "/pages/" folder now? And then under that a [slug] folder?
Answered by Yi Lon Ma
You can read about Dynamic Routes [here](https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes). You can even find examples there
View full answer

7 Replies

Avatar
You can read about Dynamic Routes [here](https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes). You can even find examples there
Answer
Avatar
Spectacled bearOP
@Yi Lon Ma - I'm still not understanding it, though. Like I said, I need the pages to be at the root, but all the examples are giving me "create a blog folder and then a [slug] folder and then a page.js file".
Avatar
you can also add it in root
Avatar
Spectacled bearOP
so a [slug] folder with a page.js file?
Avatar
yeah
Avatar
Spectacled bearOP
Ok I'll try that
Avatar
Spectacled bearOP
Cool it worked. Thanks.