q3d
January 10, 2024, 2:03pm
1
Because the administration panel overwrites my date format in the site.yaml
file according to the instructions from this thread:
Hi Thomas,
this is probably a little late, but as I just had the same issue, I am going to reply anyway:
The reason for this strange behaviour IMHO is the admin panel. Same as when you do it manually, the admin panel writes all configurations into the user/config/system.yaml file. So, when you manually edit the system.yaml and save something afterwards directly from the admin panel, it overwrites this file.
This must be combined with the fact, that the select options in the admin panel are ba…
I added the file:
user/blueprints/config/site.yaml
about content:
'@extends': '@parent'
form:
fields:
content:
fields:
pages.dateformat.short:
options:
'd-m-Y G:i': Date6
The file goes through:
bin/grav yamllinter
without errors.
Unfortunately, I still don’t have my date format options available in the panel.
1 Like
Hmm, yeah you’re in an annoying YAML tangle. I really dislike this kind of nested YAML. So I’m wondering if you should establish a few basic extensions first to test your nesting.
Could you try (or have you tried) the simpler site.yaml examples in the docs and do they work? Can you merge your changes incrementally into those to see if your nesting is accurate?
q3d
January 11, 2024, 7:38am
3
There is hope for humanity. Chat gpt can’t help with that either
Following your advice, I tried the simple versions from the documentation.
I created two files:
user/bluprints/config/system.yaml
,
user/bluprints/config/site.yaml
.
The first of these examples does not work for any of the tabs.
Second example:
'@extends': '@parent'
form:
fields:
anothersection:
type: section
title: Another Section
underline: true
fields:
myfield:
type: text
label: A label
size: large
works and adds a new section at the bottom of each tab.
However, I still don’t know how to add any text field within the section and how to finally add an item in the select short date format field.
1 Like
q3d
January 11, 2024, 7:58am
4
I managed to solve it.
I copied the file:
system/blueprints/config/system.yaml
to
user/blueprints/config/system.yaml
.
I removed everything from the file that seemed unnecessary to me and left:
'@extends': '@parent'
form:
fields:
system_tabs:
fields:
content:
fields:
pages.dateformat.short:
options:
'd-m-Y G:i': Date6
A new option appears in the selection list.
2 Likes