as described here:
i’d like to add a structured field content to my page but cannot get it done. even when just taking the example it will not add the structure field to my page.
is there any way to add the structure with the $page->create() command?
i cannot seem to format the values the right way to get it saved as an structured field either way.
Any help appreciated.
I don’t know what your code looks like, but my guess is that you are not setting the value as a YAML string. The actual value stored for structured fields is a string like for all other fields, it just “happens to be” a YAML formatted string.
You can convert your PHP arrays to YAML with the yaml::encode function.
Edit: clearly I was too slow the post linked by texnixe already says it all