$site->changeTitle()
Change the site title
$site->changeTitle(string $title, string|null $languageCode = null): Kirby\Cms\Site
Parameters
Name | Type | Default |
---|---|---|
$titlerequired | string |
no default value |
$languageCode | string ornull |
null
|
Return type
This method does not modify the existing $site
object but returns a new object with the changes applied. Learn more →
Parent class
Examples
<?php
$kirby->impersonate('kirby');
$newSite = $site->changeTitle('My shiny new site title');
echo $newSite->title();