---
title: "TypoScript backend module"
manual: "TypoScript Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3tsref:typoscript-syntax-typoscript-templates-structure@13.4"
source: "UsingSetting/Entering.rst"
modified: "2026-09-15T19:26:31+00:00"
---

# TypoScript backend module

> [!NOTE]
> **Changed in version 13.1**
>
> TypoScript on a per-site basis can now be entered via
> [sites and sets](https://docs.typo3.org/permalink/t3tsref:typoscript-site-sets@13.4). It is still possible but not
> recommended to keep TypoScript in the backend in TYPO3 13.

TypoScript can be stored in a database record or in a file. Storing it in a file
is recommended as you can keep it under version control, deploy it etc.

To store your TypoScript in a file, you can use your site set as
[TypoScript provider](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/SiteHandling/SiteSets.html#site-sets-typoscript) or store the
TypoScript in a [custom site package](https://docs.typo3.org/m/typo3/tutorial-sitepackage/13.4/en-us/Index.html#start). Use
the [Submodule "Active TypoScript"](https://docs.typo3.org/permalink/t3tsref:submodule-active-typoscript@13.4) to analyze how the TypoScript is
interpreted after parsing and combining.

When kept in the database, TypoScript is entered manually in both the
**Constants** and **Setup** fields of template records (which are
stored in the database in table `sys_template`).

**The following submodules are available:**

-   [Submodule "TypoScript records overview"](https://docs.typo3.org/permalink/t3tsref:submodule-typoscript-records-overview@13.4)
-   [Submodule "Constant Editor"](https://docs.typo3.org/permalink/t3tsref:submodule-constant-editor@13.4)
-   [Submodule "Edit TypoScript Record"](https://docs.typo3.org/permalink/t3tsref:submodule-edit-typoscript-record@13.4)
-   [Submodule "Included TypoScript"](https://docs.typo3.org/permalink/t3tsref:submodule-included-typoscript@13.4)
-   [Submodule "Active TypoScript"](https://docs.typo3.org/permalink/t3tsref:submodule-active-typoscript-1@13.4)

## Submodule "TypoScript records overview"

This submodule shows all pages that contain TypoScript either by having
a TypoScript record or by having a
[Site Set TypoScript provider](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/SiteHandling/SiteSets.html#site-sets-typoscript).

![Screenshot of Submodule "TypoScript records overview" in the TYPO3 backend](../Images/ManualScreenshots/TypoScriptModule/TypoScriptRecordsOverview.png)

If TypoScript was added by a record, it is linked.

## Submodule "Constant Editor"

> [!NOTE]
> The constant editor is only available in sites that are based on a
> TypoScript record.

> [!NOTE]
> **Changed in version 13.3**
>
> With the introduction of the site
> [Site settings editor](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/SiteHandling/SiteSettingsEditor.html#site-settings-editor)
> settings can be edited in a comfortable and type safe way on site level.
>
> The constant editor is kept for backward compatibility.

The backend module **Site Management > TypoScript > Constant Editor**
used a special format of
[Comments](https://docs.typo3.org/permalink/t3tsref:typoscript-syntax-syntax-comment-blocks@13.4)
to display a form for editing the constants.

![Screenshot of the TYPO3 Backend showing the constant editor](../Images/ManualScreenshots/TypoScriptModule/ConstantEditor.png)

It is not recommended to newly introduce constants in the constant editor.
The documentation of the constant editors comment format can still be found
at [Comment Syntax](https://docs.typo3.org/m/typo3/reference-typoscript/12.4/en-us/UsingSetting/TheConstantEditor.html#typoscript-syntax-constant-editor-comments)

## Submodule "Edit TypoScript Record"

> [!NOTE]
> The constant editor is only available in sites that are based on a
> TypoScript record.

This can be done in the **Site Management > TypoScript** module in
the submodule **Edit TypoScript Record**.

![The submodule "Edit TypoScript Record" in the TYPO3 Backend.](../Images/ManualScreenshots/TypoScriptModule/EditTypoScriptRecord.png)

When you click on **Edit the whole TypoScript record** you can edit
the complete record:

![The submodule whole TypoScript record in edit mode](../Images/ManualScreenshots/TypoScriptModule/WholeTypoScriptRecord.png)

As the TypoScript record is just a normal record it can also be seen in and
edited from the list module:

![The TypoScript record in the list module](../Images/ManualScreenshots/TypoScriptModule/TypoScriptRecordListView.png)

### Include TypoScript files

> [!NOTE]
> Only the import of files ending on '.typoscript' or '.tsconfig' are
> supported. Importing legacy files with the legacy endings '.txt' or '.ts'
> **does not work**, even if their names are explicitly used in the import.

In both the "Constants" and "Setup" fields, the
[@import](https://docs.typo3.org/permalink/t3tsref:typoscript-syntax-includes@13.4) syntax can be
used to include TypoScript contained inside files:

**EXT:my_site_package/Configuration/TypoScript/setup.typoscript**

```typoscript
# Import a single file
@import 'EXT:my_site_package/Configuration/TypoScript/randomfile.typoscript'

# Import multiple files of a single directory in file name order
@import 'EXT:my_site_package/Configuration/TypoScript/*.typoscript'

# The filename extension can be omitted and defaults to .typoscript
@import 'EXT:my_site_package/Configuration/TypoScript/'
```

### Include TypoScript from extensions

> [!NOTE]
> **Changed in version 13.1**
>
> TypoScript on a per-site basis can now be entered via
> [sites and sets](https://docs.typo3.org/permalink/t3tsref:typoscript-site-sets@13.4). If the extension to be used
> already supports site sets, those should be used instead of TypoScript
> includes in the record.

It is also possible to "Include TypoScript sets" from extensions in the
TypoScript record.

1.  In the **Site Management > TypoScript** module, select
    **Edit TypoScript Record**.
1.  Click **Edit the whole TypoScript record**
1.  Chose the tab **Advanced Options**
1.  Click the templates to include in **Available Items**.

    !["Include TypoScript sets" by choosing from the "Available items"](../Images/ManualScreenshots/TypoScriptModule/IncludeTypoScriptSet.png)

> [!TIP]
> The section [Provide frontend TypoScript in a TYPO3 extension](https://docs.typo3.org/permalink/t3tsref:extdev-add-typoscript@13.4) explains how extension
> developers can make TypoScript available for inclusion in their
> extensions.

### Include other TypoScript records

Apart from this, it is also possible to include other TypoScript template
records (in the field called **Include TypoScript records**).

![Include TypoScript records](../Images/ManualScreenshots/TypoScriptModule/IncludeTypoScriptRecord.png)

## Submodule "Included TypoScript"

With all those inclusions, it may happen that you lose the overview of the
template structure. The submodule **Included TypoScript** provides
an overview of this structure. It shows all the TypoScript files that apply to
the currently selected page, taking into account inclusions and inheritance
along the page tree.

![A visual representation of how TypoScript is included.](../Images/ManualScreenshots/TypoScriptModule/IncludedTypoScript.png)

TypoScript definitions are taken into consideration from top to bottom, which means
that properties defined in one TypoScript location may be overridden in another
location, considered at a later point by the TypoScript parser.

You can click on the **{+}** button to see details about the TypoScript
definition and its includes.

## Submodule "Active TypoScript"

You can use the submodule **Active TypoScript** to debug the
configuration array build after all TypoScript configurations are parsed and
combined. TypoScript Constants and Setup are listed separately here and
Constant usage is shown. However there is no information what location the
setting came from. Use the
[Submodule "Included TypoScript"](https://docs.typo3.org/permalink/t3tsref:typoscript-syntax-typoscript-templates-structure-analyzer@13.4) to analyze where
TypoScript was set and this module to look at the result.

![Screenshot of the Active TypoScript submodule in the TYPO3 Backend](../Images/ManualScreenshots/TypoScriptModule/ActiveTypoScript.png)
