$site->changeTitle()
Change the site title
$site->changeTitle(string $title, ?string $languageCode = null): Kirby\Cms\Site
Parameters
Name | Type | Default |
---|---|---|
$title * | string |
– |
$languageCode | string |null |
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
Example
<?php
$kirby->impersonate('kirby');
$newSite = $site->changeTitle('My shiny new site title');
echo $newSite->title();