Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

New twig template file not showing in Admin panel

Solved by pamtbaau View solution

Started by Darryl 4 years ago · 2 replies · 660 views
4 years ago

I've added the twig file template/maintenance.html.twig as well as the corresponding blueprint file in blueprint/maintenance.yaml

both files are blank at the moment

In the Admin Panel, when i create a page "Temp" using the template, the editing page has nothing on it, and I can't find how to activate my template file to have access to all of the page options.

I want to create a temporary landing page with very simple style, as I dev my site in the background.

screencap:
screencapture-localhost-darrylch-local-admin-pages-temp-2022-07-29-15_19_54|690x348

4 years ago Solution

@darrylch, There seems to be a bit of confusement...

Probably some typo's...

  • There is a folder called /templates but not /template/
  • There is a folder called /blueprints but not /blueprint/

both files (template and blueprint) are blank at the moment .... In the Admin Panel, when i create a page “Temp” using the template, the editing page has nothing on it

Confusing to me:
Why do you expect to get a page form in Admin containing page properties when your input is empty?

Basic concepts:

  • A template is used to generate a HTML page for the front-end (website) not for Admin. A template can not be activated in Admin.
  • A blueprint contains a form definition for all properties of a page (frontmatter and content). In Admin, when creating a page and selecting the name of a template, the matching blueprint is activated to paint a form with the properties for the page.

Have a look at the documentation of Theme Basics to get the basic concepts and Blueprint to learn how to create forms. In section Page Blueprints you'll find information on how to create a form for a page.

4 years ago

Thanks, I was able to find the answer using the links you provided.

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 224 2 months ago
Themes & Styling · by Ian, 2 months ago
3 118 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 481 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 72 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 152 3 months ago