Skip to content

Kirby 5.0.4

$site->previewUrl()

Returns the preview URL with authentication for drafts and versions

$site->previewUrl() has been marked as unstable. It might be changed in a future Kirby major or minor release without being considered a breaking change. Use with caution.

$site->previewUrl(Kirby\Content\VersionId|string $versionId = 'latest'): string|null

Parameters

Name Type Default
$versionId Kirby\Content\VersionIdorstring 'latest'

Return types

stringornull

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

Parent class

Kirby\Cms\Site