---
title: "Page title API"
manual: "TYPO3 Explained"
version: "11.5"
permalink: "https://docs.typo3.org/permalink/t3coreapi:pagetitle@11.5"
source: "ApiOverview/Seo/PageTitleApi.rst"
rendered: "2026-10-21T15:30:00+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v11 has reached end-of-life as of October 31th 2024 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Page title API {#pagetitle}

In order to keep setting the page titles in control, you can use the PageTitle
API. The API uses *page title providers* to define the page title based on
page record and the content on the page.

Based on the priority of the providers, the
`\TYPO3\CMS\Core\PageTitle\PageTitleProviderManager` will check the
providers if a title is given by the provider. It will start with the highest
priority and will end with the lowest priority.

By default, the Core ships two providers. If you have installed the [system
extension SEO](https://docs.typo3.org/c/typo3/cms-seo/11.5/en-us/Index.html), the provider with the (by default) highest
priority will be the `\TYPO3\CMS\Seo\PageTitle\SeoTitlePageTitleProvider`.
When an editor has set a value for the SEO title in the page properties of the
page, this provider will provide that title to the
`PageTitleProviderManager`. If you have not installed the SEO system
extension, the field and provider are not available.

The fallback provider with the lowest priority is the
`\TYPO3\CMS\Core\PageTitle\RecordPageTitleProvider`. When no other title is
set by a provider, this provider will return the title of the page.

Besides the providers shipped by the Core, you can add own providers. An
integrator can define the priority of the providers for his project.

## Create your own page title provider {#create-your-own-page-title-provider}

Extension developers may want to have an own provider for page titles. For
example, if you have an extension with records and a detail view, the title of
the page record will not be the correct title. To make sure to display the
correct page title, you have to create your own page title provider. It is
quite easy to create one.

First, create a PHP class in your extension that implements the
`\TYPO3\CMS\Core\PageTitle\PageTitleProviderInterface`, for example by
extending `\TYPO3\CMS\Core\PageTitle\AbstractPageTitleProvider`. This will
force you to have at least the `getTitle()` method in your class. Within
this method you can create your own logic to define the correct title.

```php
namespace Vendor\Extension\PageTitle;

use TYPO3\CMS\Core\PageTitle\AbstractPageTitleProvider;

class MyOwnPageTitleProvider extends AbstractPageTitleProvider
{
    public function setTitle(string $title)
    {
        $this->title = $title;
    }
}
```

Usage example, for example, in an [Extbase](https://docs.typo3.org/permalink/t3coreapi:extbase@11.5) controller:

```php
$titleProvider = GeneralUtility::makeInstance(MyOwnPageTitleProvider::class);
$titleProvider->setTitle('Title from controller action');
```

## Define priority of PageTitleProviders {#define-priority-of-pagetitleproviders}

The priority of the providers is set by the TypoScript property
`config.pageTitleProviders`. This way an integrator is able to set
the priorities for his project and can even have conditions in place.

By default, the Core has the following setup:

```typoscript
config.pageTitleProviders {
    record {
        provider = TYPO3\CMS\Core\PageTitle\RecordPageTitleProvider
    }
}
```

The sorting of the providers is based on the `before` and
`after` parameters. If you want a provider to be handled before a
specific other provider, just set that provider in the `before`,
do the same with `after`.

If you have installed the system extension SEO, you will also get a second
provider. The configuration will be:

```typoscript
config.pageTitleProviders {
    record {
        provider = TYPO3\CMS\Core\PageTitle\RecordPageTitleProvider
    }
    seo {
        provider = TYPO3\CMS\Seo\PageTitle\SeoTitlePageTitleProvider
        before = record
    }
}
```

First the `SeoTitlePageTitleProvider` (because it will be handled before
`record`) and, if this providers did not provide a title, the
`RecordPageTitleProvider` will be checked.

You can override these settings within your own installation. You can add as
many providers as you want. Be aware that if a provider returns a non-empty
value, all provider with a lower priority will not be checked.
