Skip to content

Kirby 4.1.2

Page::create()

Creates and stores a new page

Page::create(array $props): Kirby\Cms\Page

Parameters

Name Type Default
$props * array

Return type

Kirby\Cms\Page

Parent class

Kirby\Cms\Page

Example

$page = Page::create([
  'slug'     => 'a-new-article',
  'template' => 'article',
  'content' => [
    'title'  => 'A new article',
    'author' => 'Homer Simpson'
  ]
]);