TypoScript
Changed in version 13.1
Until TYPO3 v13 frontend TypoScript files where kept in folder
EXT:
by convention.
Extensions that need to be backward compatible should Support both site sets and TypoScript records.
Newly created extensions or site packages should use the Site set as a TypoScript provider
TypoScript constants should be stored in a file called constants.
and TypoScript setup in a file called setup.
.
Configuration/TypoScript/constants.typoscript
-
- Scope
- extension
- Path (Composer)
- packages/my_extension/Configuration/TypoScript/constants.typoscript
- Path (Classic)
- typo3conf/ext/my_extension/Configuration/TypoScript/constants.typoscript
Configuration/TypoScript/setup.typoscript
-
- Scope
- extension
- Path (Composer)
- packages/my_extension/Configuration/TypoScript/setup.typoscript
- Path (Classic)
- typo3conf/ext/my_extension/Configuration/TypoScript/setup.typoscript
These two files are made available for inclusion in TypoScript records with
Extension
in the file
Configuration/TCA/Overrides/sys_template.php
:
<?php
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') or die();
ExtensionManagementUtility::addStaticFile(
'my_extension',
'Configuration/TypoScript/',
'Examples TypoScript',
);
It is also possible to use subfolders or a differently named folder. The file names have to stay exactly the same including case.
Warning
In Sites that use no Site set it is possible, though not recommended, to provide TypoScript that is always included. See ext_typoscript_constants.typoscript and ext_typoscript_setup.typoscript. These files are not included when site uses a set.