Strapi + Vue - Dynamic page routing

Hello everyone!

I am currently familiarizing myself with Strapi. I use Vue.js for my frontend. I need a tip on how to build dynamic pages with Strapi and Vue. I mean the following:

  • I have created a “Pages” content type. These have a title and a URL slug. Example: Contact → /contact. Now I want that when I create new pages, they are automatically routed in Vue.

So if I create a new page with the path “/test”, it should display content in the frontend when the route “/test” is called. The type of content doesn’t matter for now. I’m just not sure how best to set this up.

I can of course query all pages via API and create the routes dynamically. However, if you call up the web page directly with the path “/test” and it has not yet been loaded, you will not see any content.

Perhaps someone has already done something like this and can point me in the right direction. I haven’t found anything in my search yet. All examples I found load dynamic articles or entries on a given page, but no dynamic routes.

Thank you!

1 Like