Attention

TYPO3 v7 has reached its end-of-life November 30th, 2018 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.

There is no further ELTS support. It is recommended that you upgrade your project and use a supported version of TYPO3.

Entering and structuring TypoScript templates

At its most basic, TypoScript is entered manually in both the "Constants" and "Setup" fields of template records (which are stored in the database in table "sys_template").

A TypoScript template as seen in the Web > List module.
The Constants and Setup fields of a TypoScript template

If the "t3editor" system extension is not installed or has been disabled via configuration options, the "Constants" and "Setup" fields will be normal multi-line text fields.

The Constants and Setup fields without the t3editor enabled

Inclusions

In both the "Constants" and "Setup" fields, the INCLUDE_TYPOSCRIPT syntax can be used to include TypoScript contained inside files.

Apart from this, it is also possible to include other TypoScript template records (in the field called "Include Basis Template") and TypoScript provided by extensions (in the field called "Include static (from extensions)").

Templates included from another template

Included templates can themselves include other templates.

Template Analyzer

With all those inclusions, it may happen that you lose the overview of the template structure. The "Template Analyzer" provides an overview of this structure. It shows all the templates that apply to the currently selected page, taking into account inclusions and inheritance along the page tree.

All templates applying to a page, as used by the Introduction Package

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

In the Template Analyzer, you can click on any listed template to view the content of its "Setup" and "Constants" fields.

Viewing the content of a given template in the Template Analyzer

The line numbers are compiled from the first template to be included, which is why the numbers are so high.