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

Upgrade flex-objects to v1.0.2

Solved by pamtbaau View solution

Started by Peter Berkel 5 years ago · 2 replies · 333 views
5 years ago

Perhaps I am still not used to the use of Grav. But I did an upgrade to flex-objects v1.0.2. What I discovered was that my own .yaml file in blueprints/flex-objects of the plugin was gone.
I put my specific .twig files already in the themes templates environment.

I thought that blueprint folders would be safe during an upgrade.

My question is where can I put my own specific flex-objects .yaml files so that it is secure during a new upgrade? How will Grav point to this place so that the yaml file is read. Is there in de Learn environment a page which gives me a direction.

Again thanks for answering.

5 years ago

If you're talking about config Yamls, then every plugin has instruction to copy first to /user folder depending on where you keep your configs. If you edit configs via Admin panel plugin, then it does this automagically. Usually it's /user/config/plugins/plugin-name.yaml, but I keep them depending on environment - /user/env/grav.local/config/plugins/plugin.yaml or /user/env/www.my-grav-page.com/...

👍 1
5 years ago Solution

@epb, Every file in the tree of a plugin, or theme should be considered potentially lost when an upgrade arrives.

Therefor, new or updated templates, config files, blueprints etc. should be placed outside the tree of the plugin/theme.

  • templates -> /user/theme/<theme>/templates
    Use an inherited theme when making changes/additions, else all will be lost after upgrading the theme.
  • config files -> /user/config/themes/<theme>.yaml or /user/config/plugins/<plugin>.yaml
  • blueprints -> user/blueprints/flex-objects/...

Docs are available at Flex Objects at Learn and the README on GitHub..

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 60 16 hours ago
Support · by Anna, 3 days ago
2 66 19 hours ago
Support · by Justin Young, 20 hours ago
1 34 20 hours ago
Support · by Duc , 1 week ago
2 70 6 days ago
Support · by Colin Hume, 1 week ago
2 61 6 days ago