Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic pages using templates #1671

Open
ashleykinnard opened this issue Jan 23, 2023 · 1 comment
Open

Dynamic pages using templates #1671

ashleykinnard opened this issue Jan 23, 2023 · 1 comment

Comments

@ashleykinnard
Copy link

Hey, very new to Gridsome and I think its wonderful.

I am using wordpress as my headless cms and I want to create a template similar to the wordPressPost.vue but for all pages that dont have a defined page in pages, something like wordPressPage.vue

I understand that templates are used to create single pages for each node (a post for example) in a collection of posts.
My question is can pages also work as posts where they exist in a collection of pages and as such I can have a dynamic template for them instead of having defined pages?

I hope this makes sense :)

@Bomberus
Copy link

You can implement a dynamic route: https://gridsome.org/docs/dynamic-routing/#programmatic-dynamic-routes.
Then you can fetch your data via client side scripting.

In general dynamic pages are not really the purpose of a static website builder.
And if you want to often change / maintain pages you either need to rebuild your gridsome delivery or switch to using a CMS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants