Skip to content

Kirby 5.0.4

$page->version()

Returns a content version instance

$page->version(Kirby\Content\VersionId|string|null $versionId = null): Kirby\Content\Version

Parameters

Name Type Default
$versionId Kirby\Content\VersionIdorstringornull null

Return type

Kirby\Content\Version

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

Parent class

Kirby\Cms\Page inherited from Kirby\Cms\ModelWithContent

Examples

// get the latest saved content of a page
$page->version('latest');

// get all unsaved changes
$page->version('changes');