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

Overwrite site.yaml

Started by finrik 8 years ago · 4 replies · 806 views
8 years ago

Hello

I create a file named site.yaml inside user/themes/mytheme/blueprints/ with this code:

TXT
@extends:
'@parent'

form:
fields:
content:

YAML
        fields:
            myfield:
                type: text
                label: My Field

This is the sample code of the documentation:
https://learn.getgrav.org/forms/blueprints/example-config-blueprints

But the field "My Field" is not displayed under "Config"->"Site".

What am I doing wrong?

Thank you for your help!

8 years ago

Hi @finrik, I use this technique in my Open Course Hub skeleton, perhaps another example might help you?

https://github.com/hibbitts-design/grav-skeleton-course-hub/blob/master/blueprints/config/site.yaml

I also tested the example given of:
@extends:
'@parent'

YAML
form:
    fields:
        content:

            fields:
                myfield:
                    type: text
                    label: My Field

And it seems to work for me:
2018-02-05_10-06-15|613x500

Please let me know if you can get things going.

last edited 02/05/18 by Paul Hibbitts
8 years ago

Thank you for your answer! But it didn't work.

This file:
/user/themes/mytheme/blueprints/config/site.yaml

@extends:
'@parent'

form:
fields:
content:

YAML
        fields:
            myfield:
                type: text
                label: My Field

However, the field is not displayed. It looks like that the file is not read from Grav Admin?

8 years ago

Thanks a lot, it worked.

Of course, it would be really nice if it could be configured via themes. Maybe in the future. :)

👍 1

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1138 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 61 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 135 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 110 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 129 7 months ago