Need Help Deciding Dynamic Routes Architecture
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
I'm building a dashboard with a document page that has a sidebar with various page options. I plan to use dynamic routes to access the different documents.
⚫︎ First option :
document/[id]/description/page.tsx
document/[id]/keywords/page.tsx
...
⚫︎ Second option :
document/description/[id]/page.tsx
document/keywords/[id]/page.tsx
....
I'm considering using the generateStaticParams function within the layout. As I see it, with the first option, I could generate all the document options (description, keywords...) pages, while with the second, I could generate the pages for a specific document.
Which approach would you recommend?
Thanks!
⚫︎ First option :
document/[id]/description/page.tsx
document/[id]/keywords/page.tsx
...
⚫︎ Second option :
document/description/[id]/page.tsx
document/keywords/[id]/page.tsx
....
I'm considering using the generateStaticParams function within the layout. As I see it, with the first option, I could generate all the document options (description, keywords...) pages, while with the second, I could generate the pages for a specific document.
Which approach would you recommend?
Thanks!