I want to create a new page in a multi-language Kirby install. Default language is en
.
$page->children()->create('unique-uid', 'template', [
'title' => 'This is the page title'
]);
This creates two .txt
files in the new page’s folder: template.txt
and template.en.txt
.
The view loads content from template.txt
, but any subsequent logic applied to the page, for example $page->update()
, applies the changes only to template.en.txt
.
How can I create a page programmatically and only be left with the template.en.txt
file?