Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

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

Started by Naor Penso 9 years ago · 1 replies · 899 views
9 years ago

Hi!

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.

Note:
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 ☀️
Naor

last edited 03/02/18 by Naor Penso
9 years ago

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

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago