TypoScript backend module

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 store the TypoScript in a custom site package. Use the Submodule "Active TypoScript" 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).

Submodule "TypoScript records overview"

This submodule shows all pages that contain TypoScript by having a TypoScript record.

Screenshot of Submodule "TypoScript records overview" in the TYPO3 backend

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

Submodule "Edit TypoScript Record"

Changed in version 12.0

The TypoScript management tools are now found in backend module Site Management > TypoScript. It was formerly found in "Page > Template".

The submodule Edit TypoScript Record was previously named "Info / Modify".

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.

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

The submodule whole TypoScript record in edit mode

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

Include TypoScript files

Changed in version 12.0

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 syntax can be used to include TypoScript contained inside files:

EXT:my_site_package/Configuration/TypoScript/setup.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/'
Copied!

Include TypoScript from extensions

Changed in version 12.0

The TypoScript management tools are now found in backend module Site Management > TypoScript. It was formerly found in "Page > Template".

The submodule Edit TypoScript Record was previously named "Info / Modify".

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

  1. In the Site Management > TypoScript module, select :guilabel:Edit TypoScript Record`.
  2. Click Edit the whole TypoScript record
  3. Chose the tab Advanced Options
  4. Click the templates to include in Available Items.

    "Include TypoScript sets" by choosing from the "Available items"

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

Submodule "Included TypoScript"

Changed in version 12.0

The TypoScript management tools are now found in backend module Site Management > TypoScript. It was formerly found in "Page > Template".

The submodule Included TypoScript was renamed from "TypoScript Analyzer".

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.

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" to analyze where TypoScript was set and this module to look at the result.

Screenshot of the Active TypoScript submodule in the TYPO3 Backend

Debug the parsed and combined TypoScript