nextjs with multiple templates based on website url
Unanswered
Maul posted this in #help-forum
MaulOP
I want to write my next project in NextJs with multiple templates. Imagine like a WP site where u can select the template in your admin area. I think this is not so easy as it looks like. Managing all the imports and being still SEO friendly. Any idea where i can start on focus?
I thought first making different directories for different templates but the imports are the problem.
I thought first making different directories for different templates but the imports are the problem.
2 Replies
I think the templates should be the last thing you should do. Try to first created pages, that contains sections. These pages then can be listed. If a user loads a page, he can access the sections of the website. These sections can be edited with different variables. Inside these sections are blocks. Blocks are the components, that the user can edit/move/change/... after you build all these data stuff, you can think about how to create a template for them. If I would be you, I would look at the page, fetch all sections with all blocks, create a new page and copy every section and block to this new page. And all in one process and thanks to nextjs with parallel fetching, so it doesn't take long @Maul
@Maul ?