Any tutorial on "how to build my own page template"?


I have seen the detailed Grav documentation about pages and content types but i cannot get my head around creating my own page template.
The template should be a “closed” template in which there are input fields, after filling all fields the page can be saved.
In example, using the default template provided with Grav (antimatter) there are the following types within a page: blog, default, error etc.

What i would like to achieve is having another page template called “KB article” in which i will predefine the structure, possible inputs etc.

I have tried to replicate the page.yaml and change the type just to validate but i get the following error:

RuntimeException (400)
Template “kb.html.twig” is not defined.

Thanks :sunny:

Hi ,

If you have created a kb.yaml in the user/themes/‘mytheme’/blueprints , you must create a kb.html.twig in the “/user/themes/‘mytheme’/templates” folder