Skip to content

Kirby 3.7.5

new Page()

Creates a new page object

new Page(array $props)

Parameters

Name Type Default
$props * array

For the $props parameter, you pass an array with the following data, which will be used to set up the Kirby\Cms\Page object:

Name Type Description
blueprint array Sets the Blueprint object
children array Sets the published children collection
content array Sets the Content object
dirname string Sets the dirname manually, which works
more reliable in connection with the inventory
than computing the dirname afterwards
drafts array Sets the draft children collection
files array Sets the Files collection
isDraft bool Sets the draft flag
num int Sets the sorting number
parent Kirby\Cms\Page Sets the parent page object
root string Sets the absolute path to the page
slug * string Sets the required Page slug
template string Sets the intended template
translations array Create the translations collection from an array
url string Sets the Url

Parent class

Kirby\Cms\Page