Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Flex Objects and directory

Started by p 4 years ago · 0 replies · 548 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 Vladimir Novak, 2 weeks ago
3 292 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 277 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 403 2 months ago
Plugins · by Rene, 2 months ago
2 574 2 months ago
Plugins · by Xavier, 3 months ago
2 490 3 months ago