Skip to content

Kirby 3.8.4

$site->visit()

Sets the current page by id or page object and returns the current page

$site->visit(string|\Kirby\Cms\Page $page, string $languageCode = null): Kirby\Cms\Page

Parameters

Name Type Default
$page * string|Kirby\Cms\Page
$languageCode string null

Return type

Kirby\Cms\Page

Parent class

Kirby\Cms\Site

This method is usually only useful in the context of routing, especially in a multi-language setup. See the routing docs.