I try to get data of a page into a blueprint in the admin plugin — using the themename.php
script in my theme folder.
people.md — the content of the page I need
---
title: Test Page
people:
- Holger
- Peter
- Simon
---
person.yaml — the yaml file where I want to use the data from above
name:
type: select
label: Name
@data-options: '\Grav\Theme\Themename::names'
person.md — person.yaml output file
---
title: Personal Page
name: Peter
---
How can I accomplish that? My idea is to somehow use the grav api and read out the people.md — but I dont know how. Is there a simple, dynamic way or is it just a file_get_contents('path/to/file/people.md')
?