finrik
1
Hello
I create a file named site.yaml inside user/themes/mytheme/blueprints/ with this code:
@extends:
'@parent'
form:
fields:
content:
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!
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’
form:
fields:
content:
fields:
myfield:
type: text
label: My Field
And it seems to work for me:
Please let me know if you can get things going.
finrik
3
Thank you for your answer! But it didn’t work.
This file:
/user/themes/mytheme/blueprints/config/site.yaml
@extends:
‘@parent’
form:
fields:
content:
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?
Actually, you need to put that file in your /user/blueprints/config
folder (see https://learn.getgrav.org/forms/blueprints/example-config-blueprints) - please give that a go and let me know if that works for you.
finrik
5
Thanks a lot, it worked.
Of course, it would be really nice if it could be configured via themes. Maybe in the future.
1 Like