Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Upgrade flex-objects to v1.0.2

Solved by pamtbaau View solution

Started by Peter Berkel 6 years ago · 2 replies · 562 views
6 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.

6 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
6 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 webmasterodp, 1 week ago
4 170 1 week ago
Support · by nwhitfield, 1 week ago
2 149 1 week ago
Support · by stell, 3 weeks ago
5 379 2 weeks ago
Support · by gravinator, 1 month ago
5 572 2 weeks ago
Support · by Gravver, 3 weeks ago
6 356 3 weeks ago