Hi! I started to use grav and I really love it! But, I’m wondering if it is possible to have a global page skeleton with fields and have more than one pages using these skeleton. For example: Having 1 skeleton (Planet) and create some pages with that (Earth, Venus, Mars,…)
Hi, a skeleton as used in https://getgrav.org/downloads/skeletons is a sort of demo site, which gathers together a theme, some plugins, some pages, to build a sample site you can download.
In this context, I don’t understand your question. Can you explain a bit more?
Hi! What I’m asking is if it is possible to have a page form used as a base for creating multiple pages. In the example above, I’d like to create a page form (Planet) used to create content (Venus, Mars, Earth,…), or for example, have another page form (Movie) to create content (Independence day, Tron,…)
Oh yes. In Admin, you can create page types. You can learn more on https://learn.getgrav.org/content/content-pages.
Basically, your theme has the option to define all the page types it needs. The Learn theme, used to build the docs, provides a
chapter page types: https://github.com/getgrav/grav-theme-learn2/tree/develop/templates
Antimatter, the default theme, is more generalist and provides different page types: https://github.com/getgrav/grav-theme-antimatter/tree/develop/templates
You can see here
blog (blog posts list)
item (single blog post)
and a few more.
So you can create a
planet.html.twig and a
movie.html.twig templates, and create your pages:
Now, to make them easily editable in Admin, you need to put a blueprint in your theme. Like these ones. This is a bit more advanced, but we have a great documentation for that.