The problem I am having the the following: When turning the header strucure to a array with this: <php foreach($site->header()->yaml() as $header):?>
Then I won’t be able to use toPages() like this: <?php foreach($header['menu']->toPages() as $menu):?>
Since the Textfile is now transformed into an array.
Is there a way to reverse this and call ->toPages() on a multilevel structure field?
The same problen will persist. Since when you call toStructure in the end I will have an array of my “menu” field. And since ->toPages() required the “default” yaml text format just like it is saved in the /content/site.txt and not a array/yaml or object to be given I cannot use ->toPages or ->toPage on this.
@Ebbel Did you know we have a “Question ” category for questions? Would be great if you could choose the question category that corresponds with your Kirby versions. Helps us to keep track and answer your question faster. Thanks.