I can’t seem to get nested structures to work. It seems like toStructure()
converts all yaml
content it finds instead of simply “one layer”.
with this Kirby content file:
Nester:
-
nested:
-
text: miao
doing this in the template:
<?php
foreach ($page->nester()->toStructure() as $item) {
dump($item->nested());
}
gives me this output:
Kirby\Cms\Field Object
(
[nested] => Array
(
[0] => Array
(
[text] => miao
)
)
)
nested
is an array, while I expected another Field
object.
Is the array expected?