Can we use constant variable in include_typoscript
In my constants.txt file
filepaths{
# cat=FLUIDPAGES/settings; type=text; label=Pfad zu den Templates
defaultTemplateRootPath = typo3conf/ext/defaulttemplate/
}
In my 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 for include typoscript file, If yes it's very helpful for me and I could add multiple themes/templates in multi - Domain site.
According to https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/TypoScriptSyntax/Syntax/Includes.html you can't use constants in the INCLUDE_TYPOSCRIPT part:
It is processed BEFORE any parsing of TypoScript
But you could use the following method in your localconf.php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('myKey', 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:' . $filePath . 'fluid.txt">');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With