Skip to content

Kirby 5.0.4

$page->changeSlug()

Changes the slug/uid of the page

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

Parameters

Name Type Default
$slugrequired string no default value
$languageCode stringornull null

Return types

Kirby\Cms\Page

This method does not modify the existing $page object but returns a new object with the changes applied. Learn more →

Exceptions

Type Description
Kirby\Exception\LogicException If the directory cannot be moved

Parent class

Kirby\Cms\Page