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.

Forms & Blueprints

Page Blueprints doesn't load (doesn't show up in Admin)

Solved by pamtbaau View solution

Started by Mantas 5 years ago · 2 replies · 960 views
5 years ago

I created new page via admin panel - Projects.
It created:
user/pages/0.3.projects/projects.md

I created new template in THEME/templates/projects.html.twig - this works.

Then I created blueprint in THEME/blueprints/projects.yaml with this code:

YAML
title: Projects
@extends: 
  type: default
  context: blueprints://pages 

form:
  validation: loose

  fields:

    tabs:
      type: tabs
      active: 1

      fields:
        content:
          type: tab
          title: PLUGIN_ADMIN.CONTENT

          fields:
            header.heading:
              type: text
              limit: 1
              label: Heading

          fields:
            header.text:
              type: textarea
              limit: 1
              label: Text

(i just copied it from other Grav project, where it works)

And It's just not showing up in admin. I tried it with several pages, tried cleaning Grav cache, and I just can't make it show itself.

5 years ago Solution

@Mantas, Run $ bin/grav yamllinter inside your site and your will see an error similar to the following:

/user/themes/quark/blueprints/project.yaml - The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 2 (near "@extends:").

Btw. Grav 1.7+ is more strict on yaml syntax. It's better to use extends@: instead. See the docs First Example

Then, after fixing that issue, run $ bin/grav yamllinter again and you will get something similar to:

/user/themes/quark/blueprints/project.yaml - Duplicate key "fields" detected at line 26 (near " label: Text").

👍 1
last edited 01/25/21 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1140 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 63 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 138 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 114 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 132 7 months ago