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.

Support

Add a custom YAML file via plugin

first-time plugins

Solved by pamtbaau View solution

Started by modal mouse 5 years ago · 2 replies · 600 views
5 years ago

Hi everyone,

Just starting out with Grav, so apologies if it's totally obvious what I am asking about 🙂

I am following the Admin Recipes > Add a custom YAML file via plugin guide but I have an issue which I can't find the answer to.

Question:
From the Cookbook > Admin Recipe guide I understand that the values are stored in user/plugins/myplugin/blueprints/config/details.yaml.

But when I update the fields in the plugin I do not see any changes made to the details.yaml file

Am I misunderstanding how this should work?

Any help or hints would be greatly appreciated, thank you in advance

5 years ago Solution

@modal_mous, I'm afraid there might indeed be some misunderstanding...

I understand that the values are stored in user/plugins/myplugin/blueprints/config/details.yaml

That file does not contain "values", but instead it contains the definition of the 'Details' form which will be available in the Configuration section in Admin.

The values you enter into the Details form in Admin will be saved in '/user/config/details.yaml'

The recipe by the way works as expected.

👍 1
5 years ago

Hi Pamtbaau,

You are absolutely right :) I'm still wrapping my head around flat-file cms while learning Grav!

I was not aware that the actual values were stored in a auto-generated yaml file corresponding to the plugins name, but thank you so much for clearing it up for me!

All the best and have a great day

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
3 66 25 minutes ago
Support · by Anna, 3 days ago
2 72 21 hours ago
Support · by Justin Young, 22 hours ago
1 40 22 hours ago
Support · by Duc , 1 week ago
2 76 6 days ago
Support · by Colin Hume, 1 week ago
2 70 6 days ago