---
title: "Setting page TSconfig"
manual: "TypoScript Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3tsref:setting-page-tsconfig@13.4"
source: "UsingSettingTSconfig/PageTSconfig.rst"
modified: "2026-09-15T07:24:16+00:00"
---

# Setting page TSconfig

It is recommended to always define custom page TSconfig in a project-specific
[sitepackage](https://docs.typo3.org/m/typo3/tutorial-sitepackage/13.4/en-us/Index.html#start) extension. This way the page TSconfig
settings can be kept under version control.

The options described below are available for setting page TSconfig in
non-sitepackage extensions.

Page TSconfig can be defined globally as
[Default page TSconfig](https://docs.typo3.org/permalink/t3tsref:pagesettingdefaultpagetsconfig@13.4), on site level via
[Page TSconfig via site or set](https://docs.typo3.org/permalink/t3tsref:include-static-page-tsconfig-per-site@13.4) or for a
[page tree](https://docs.typo3.org/permalink/t3tsref:include-static-page-tsconfig@13.4), a page and all its subpages.

It is also possible to set
[set page TSconfig directly in the page properties](https://docs.typo3.org/permalink/t3tsref:pagetsconfig-enter-data@13.4) but
this is not recommended anymore.

-   [Setting the page TSconfig globally](https://docs.typo3.org/permalink/t3tsref:setting-the-page-tsconfig-globally@13.4)
-   [Page TSconfig on site level](https://docs.typo3.org/permalink/t3tsref:page-tsconfig-on-site-level@13.4)
-   [Static page TSconfig](https://docs.typo3.org/permalink/t3tsref:static-page-tsconfig@13.4)
-   [Set page TSconfig directly in the page properties](https://docs.typo3.org/permalink/t3tsref:set-page-tsconfig-directly-in-the-page-properties@13.4)
-   [Verify the final configuration](https://docs.typo3.org/permalink/t3tsref:verify-the-final-configuration@13.4)
-   [Overriding and modifying values](https://docs.typo3.org/permalink/t3tsref:overriding-and-modifying-values@13.4)
-   [Example](https://docs.typo3.org/permalink/t3tsref:example@13.4)

## Setting the page TSconfig globally

Global page TSconfig should be stored within an extension, usually a sitepackage
extension. The content of the file `Configuration/page.tsconfig` within
an extension is automatically loaded during build time.

It is possible to load other TSconfig files with the import syntax within this
file:

**EXT:my_sitepackage/Configuration/page.tsconfig**

```typoscript
@import 'EXT:my_sitepackage/Configuration/TsConfig/Page/Basic.tsconfig'
@import 'EXT:my_sitepackage/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig'
```

Many page TSconfig settings can be set globally. This is useful for
installations that contain only one site and use only one sitepackage extension.

Extensions supplying custom default page TSconfig that should always be included,
can also set the page TSconfig globally.

The PSR-14 event [BeforeLoadedPageTsConfigEvent](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Events/Events/Core/TypoScript/BeforeLoadedPageTsConfigEvent.html#BeforeLoadedPageTsConfigEvent) is available to
add global static page TSconfig before anything else is loaded.

### Global page TSconfig, compatible with TYPO3 v11 and v12

In TYPO3 v11 installations the content of `Configuration/page.tsconfig`
is not loaded automatically yet. You can achieve compatibility with both
TYPO3 v11 and v12 by importing the content of this file with the API function
`ExtensionManagementUtility::addPageTSConfig`:

**EXT:my_sitepackage/ext_localconf.php**

```php
<?php

declare(strict_types=1);

use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;

defined('TYPO3') or die();

$versionInformation = GeneralUtility::makeInstance(Typo3Version::class);
// Only include page.tsconfig if TYPO3 version is below 12 so that it is not imported twice.
if ($versionInformation->getMajorVersion() < 12) {
  ExtensionManagementUtility::addPageTSConfig(
    '@import "EXT:my_sitepackage/Configuration/page.tsconfig"',
  );
}

```

## Page TSconfig on site level

> [!NOTE]
> **New in version 13.1**
>
> Page TSconfig can be included on a per site level.

Page TSconfig can be defined on a site level by placing a file called
`page.tsconfig` in the storage directory of the site
([config/sites/\<identifier>/](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/SiteHandling/Basics.html#site-storage)).

Extensions and site packages can provide page TSconfig in
[site sets](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/SiteHandling/SiteSets.html#site-sets) by placing a file called `page.tsconfig`
into the folder of that set.

This way sites and sets can ship page TSconfig without the need for database
entries or by polluting global scope. Dependencies can be expressed via site sets,
allowing for automatic ordering and deduplication.

See also
[site sets as page TSconfig provider](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/SiteHandling/SiteSets.html#site-sets-page-tsconfig).

### Example: load page TSconfig from the site set and the site

Let us assume, you have a site set defined in your extension:

**EXT:my_extension/Configuration/Sets/MySet/config.yaml**

```yaml
name: my-vendor/my-set
label: My Set
```

And use it in a site in your project:

**config/sites/my-site/config.yaml**

```yaml
base: 'http://example.com/'
rootPageId: 1
dependencies:
  - my-vendor/my-set
```

You can now put a file called `page.tsconfig` in the same folder like your
site configuration and it will be automatically loaded for all pages in that
site.

**config/sites/my-site/page.tsconfig**

```tsconfig
# This tsconfig will be loaded for pages in site "my-site"
# [...]
```

Or you can put the file `page.tsconfig` in the same directory like the
site set you defined in your extension. It will then be loaded by all pages
of all sites that depend on this set:

**EXT:my_extension/Configuration/Sets/MySet/page.tsconfig**

```tsconfig
# This tsconfig will be loaded for pages in all sites that depend on set 'my-vendor/my-set'
# [...]
```

## Static page TSconfig

### Include static page TSconfig into a page tree

Static page TSconfig that has been
[registered](https://docs.typo3.org/permalink/t3tsref:register-static-page-tsconfig@13.4) by your sitepackage or a
third party extension can be included in the page properties.

1.  Go to the page properties of the page where you want to include the page TSconfig.
1.  Go to the tab **Resources**, then to
    **page TSconfig > Include static page TSconfig (from extensions)** and
    select the desired configurations from the **Available Items**.

### Register static page TSconfig files

Register PageTS config files in the `Configuration/TCA/Overrides/pages.php`
of any extension.

These can be [selected in the page properties](https://docs.typo3.org/permalink/t3tsref:include-static-page-tsconfig@13.4).

**EXT:my_sitepackage/Configuration/TCA/Overrides/pages.php**

```php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

ExtensionManagementUtility::registerPageTSConfigFile(
  'extension_name',
  'Configuration/TsConfig/Page/myPageTSconfigFile.tsconfig',
  'My special config',
);

```

It is not possible to use label reference <[Label references / LLL strings](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Localization/Labels/Index.html#label-reference)>\`\_
for the third parameter as the extension name will be automatically appended.

If you need to localize these labels, modify the TCA directly instead of using
the API function:

**EXT:my_sitepackage/Configuration/TCA/Overrides/pages.php**

```php
<?php

$GLOBALS['TCA']['pages']['columns']['tsconfig_includes']['config']['items'][] =
    [
      'LLL:EXT:my_sitepackage/Resources/Private/Language/locallang_db.xlf:pages.pageTSconfig.my_ext_be_layouts',
      'EXT:my_sitepackage/Configuration/TsConfig/Page/myPageTSconfigFile.tsconfig',
    ];

```

## Set page TSconfig directly in the page properties

Go to the page properties of the page where you want to include the page TSconfig
and open the tab **Resources**.

You can enter page TSconfig directly into the field **Page TSconfig**:

![TSconfig-related fields in the Resources tab of a page](../Images/ManualScreenshots/List/TSconfigPageInput.png)

Page TSconfig inserted directly into the page properties is applied to the
page itself and all its subpages.

> [!NOTE]
> The configuration is stored in the database and not in the file
> system. Therefore it cannot be kept under version control. This
> strategy is not recommended. Setting page TSconfig in the page properties
> directly is available for backward-compatibility reasons and for quickly trying
> out some settings in development only.

## Verify the final configuration

The full page TSconfig for any given page can be viewed using the module
**Page TSconfig** with in the **Site Management** section.

## Overriding and modifying values

Page TSconfig is loaded in the following order, the latter override the former:

1.  [Default page TSconfig](https://docs.typo3.org/permalink/t3tsref:pagesettingdefaultpagetsconfig@13.4) that was
    set globally
1.  [Static page TSconfig](https://docs.typo3.org/permalink/t3tsref:pagesettingdefaultpagetsconfig@13.4) that was
    included for a page tree.
1.  [Direct page TSconfig](https://docs.typo3.org/permalink/t3tsref:pagetsconfig-enter-data@13.4) entered directly in
    the page properties.
1.  [User TSconfig overrides](https://docs.typo3.org/permalink/t3tsref:userrelationshiptovaluessetinpagetsconfig@13.4)

Static and direct page TSconfig are loaded for the page they are set on and
all their subpages.

The TypoScript syntax to
[modify](https://docs.typo3.org/permalink/t3tsref:typoscript-syntax-syntax-value-modification@13.4) values
can also be used for the page TSconfig.

## Example

Default page TSconfig

**EXT:site_package/Configuration/page.tsconfig**

```typoscript
RTE.default.proc.allowTagsOutside = hr
```

Static page TSconfig included on the parent page

**EXT:site_package/Configuration/page.tsconfig**

```typoscript
RTE.default.proc.allowTagsOutside := addToList(blockquote)
```

Finally you get the value "hr,blockquote".
