Skip to content

Kirby 5.0.4

$page->createChild()

Creates a child of the current page

$page->createChild(array $props): Kirby\Cms\Page

Parameters

Name Type Default
$propsrequired array no default value

Return type

Kirby\Cms\Page

This method modifies the existing $page object it is applied to and returns it again.

Parent class

Kirby\Cms\Page

The $props parameter

The properties are the same as for Page::create. However, num, parent, site and url are pre-defined by the parent $page and cannot be changed.