$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 | string ornull |
null
|
Return types
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 |