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

Flex Objects and directory

Started by p 4 years ago · 0 replies · 642 views
4 years ago

Is it possible to use flex objects with variable directories? Usually the directory has to be specified in the flex-blueprint under

YAML
    storage:
      class: 'Grav\Framework\Flex\Storage\SimpleStorage'
      options:
        formatter:
          class: 'Grav\Framework\File\Formatter\JsonFormatter'
        folder: user-data://flex-objects/guestbook.json

Would it be possible to define the folder variably?

Use case would be a guestbook plugin with multiple storage directories that can be specified in the frontmatter of a md page file. This way each page could have its own storage directory.

Suggested topics

Topic Participants Replies Views Activity
Plugins · by renedebaaij, 2 days ago
0 36 2 days ago
Plugins · by complanar, 3 weeks ago
6 389 2 weeks ago
Plugins · by BenLaKnet, 2 weeks ago
1 206 2 weeks ago
Plugins · by complanar, 1 month ago
2 480 4 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 760 2 months ago