Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Upgrade flex-objects to v1.0.2

Solved by pamtbaau View solution

Started by Peter Berkel 6 years ago · 2 replies · 501 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 complanar, 6 days ago
6 151 1 day ago
Support · by Rick Beebe, 6 days ago
2 111 3 days ago
Support · by blu3prince, 3 days ago
0 60 3 days ago
Support · by alex, 5 days ago
2 99 4 days ago
Support · by Marcel, 2 weeks ago
1 151 4 days ago