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.

Plugins

Flex Objects and directory

Started by p 3 years ago · 0 replies · 426 views
3 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 Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 53 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1179 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 47 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 72 2 months ago