dynamic routing
Answered
Spectacled bear posted this in #help-forum
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?
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
7 Replies
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
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".
you can also add it in root
Spectacled bearOP
so a [slug] folder with a page.js file?
yeah
Spectacled bearOP
Ok I'll try that
Spectacled bearOP
Cool it worked. Thanks.