https://getkirby.com/docs/cheatsheet/page/create
https://getkirby.com/docs/cheatsheet/page/update
Maybe I want to create a de
page instead of the default en
. Then I need to first create an empty page and then use $page->update()
to have the de
version.
It would be nice to have a lang attribute in the create function as well. What do you think?
Update
Now I need to do something like this:
page()->create($uri, 'template', array() );
page($uri, site()->language()->code() );
But I think this would be nicer:
page()->create($uri, 'template', array(), site()->language()->code() );