Hi,
I’m having trouble with a simple structure field (basic comment-function for a blog). The problem is, that the yaml()-method outputs OK, but the toStructure()-method outputs “0”.
The content-text-file contains this:
----
Comments:
-
comment: asdf
author:
- mail@example.com
date: 2019-01-29 14:50
----
When I dump it as YAML:
<?php dump($page->comments()->yaml()) ?>
The result looks good:
Array
(
[0] => Array
(
[comment] => asdf
[author] => Array
(
[0] => mail@example.com
)
[date] => 2019-01-29 14:50
)
)
When I use the toStructure()-method:
<?php dump($page->comments()->toStructure()) ?>
The output is:
Kirby\Cms\Structure Object
(
[0] => 0
)
What am I missing?
Thank you.