Typoscript uses a constant in include_typoscript

Is it possible to use a constant variable in include_typoscript

In constants.txt file

filepaths{
    # cat=FLUIDPAGES/settings; type=text; label=Pfad zu den Templates
    defaultTemplateRootPath = typo3conf/ext/defaulttemplate/
}

In setup.txt file

Include Page Template
<INCLUDE_TYPOSCRIPT: source="FILE: {$filepaths.defaultTemplateRootPath}fluid.txt">

I just need to use {$ filepaths.defaultTemplateRootPath} in my setup file to include the typoscript file. If yes, this is very useful for me, and I could add several themes / templates in a multi-domain site.

+4
source share
1 answer

According to http://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/Syntax/Includes/Index.html you cannot use constants in the INCLUDE_TYPOSCRIPT part:

It is processed before any TypoScript analysis.

localconf.php

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('myKey', 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:' . $filePath . 'fluid.txt">');
+2

Source: https://habr.com/ru/post/1524433/


All Articles