Reading individual YAML files from user/data subfolder in Twig template

I’m trying to read individual YAML files from user/data/selected-profiles/ in a Twig template. Each file is named like alan-lippman.yaml and contains fields like username, name, type, bio, home_state, photo_1, photo_2, date.

I’ve tried several approaches with no success:

Flex Objects — I set up a blueprint with both FileStorage and FolderStorage storage classes. The directory is found and registered, but getCollection() always returns 0 items. The files are definitely there (28 .yaml files).

Locatorgrav.locator.findResource('user://data/selected-profiles', true) correctly returns the folder path, but grav.locator.findResources('user://data/selected-profiles', true, true) returns 0 files.

Questions:

  1. What is the correct way to read multiple individual YAML files from a user/data subfolder in a Twig template in Grav 1.7.49.5?

  2. Is there a correct Flex Objects storage class and blueprint configuration for individual YAML files (one file per record)?

  3. Is there a Twig function or Grav utility that can list and read files from a folder?

Running Grav 1.7.49.5, Flex Objects plugin v1.3.8, on Windows with Laragon.

@phil, In general it is not appreciated that questions are cross-posted (asked in multiple forums), as you have done on this forum and on Discord within a timespan of 8 minutes.

See this topic in the The art of asking great questions:

Prevent cross-posting

Please don’t post your question in more than one forum (cross-posting). In each forum, people will be spending time and effort to answer the question and in the end, the time and effort in all but one will be wasted.

Instead, choose the best channel and wait a few days. Then post in another place. Provide links between each forum and repost the answer (link) in each location

You have been given an answer on Discord, it would be appreciated if you repost that answer into this forum. By doing so, all locations will benefit from answers given.