Method for writing fields?

As far as I know, all default Kirby methods are the ‘Return’ type.

What about methods for writing objects?

I want to make an interface with editing capabilities, so I can make simple changes without going over to the panel.

I would like for example, to rewrite a page field based on a frontend input.

Sure I can use xml, json, native PHP yaml, etc. But I want to know if is there a way to do this inside Kirby.

Do you already know $page->update()? http://getkirby.com/docs/cheatsheet/page/update

1 Like

I sure did not. Thank you

used structure and page update in this demo code: https://gist.github.com/svnt/9ef24a0be14d5208fdad

maybe it helps.

Svnt

3 Likes

That is exactly what I was about to ask: to change structure fields.

I will try that