0
  1. I see that TYPO3 CMS 8.7 now supports .typoscript files extension for all typoscript files... but what about TsConfig files? Should tsconfig files all have a .tsconfig or .typoscript file extension? I saw the polls but not official docs on what to do with tsconfig files?
  2. What typoscript and tsconfig files get automatically included in my custom extension? Do all Configuration/TypoScript/* and Configuration/TsConfig/* get added? If not, is it just a subset of all files like just TypoScript/setup.typoscript, TypoScript/constants.typoscript, TsConfig/Configuration.typoscript?

Ultimately I'm wanting to automate the inclusion of setup and constants TS plus PageTS config in TYPO3 as we migrate to using DDEV.

god_is_love
  • 571
  • 5
  • 18

1 Answers1

1

There is no automation about files which gets included.

For include in another typoscript you could use any file extension. There the usage of .typoscript just is an convention to get no stress in your editor, which might use the wrong syntax highlighting as it thinks .ts is typesript.

At one place the file extension is relevant:
If you build an extension and have a static typoscript. the files for static templates (constants+setup) used the extension .txt (which do not trigger any syntax highlighting) and since TYPO3 9 it is .typoscript

  • ext_typoscript_setup.typoscript
  • ext_typoscript_constant.typoscript
  • Configuration/TypoScript/setup.typoscript
  • Configuration/TypoScript/constant.typoscript
Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38
  • Nice, I hadn't noticed the ext_typoscript_setup.typoscript thing before. Looks like that file will be included automatically when you enable your extension without having to include static, is that right? (Also, it appears that these are TYPO3 8.7.x updates instead of 9.x) – god_is_love May 15 '18 at 13:41
  • Still don't know though if there's such an officially supported file extension of `.tsconfig`? – god_is_love May 15 '18 at 18:37
  • I also found that you can add Page TSConfig automatically with `addPageTSConfig` or give the user the option to do it manually using `registerPageTSConfigFile`, I ended up using the following in `ext+localconf.php`... `\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('');`. Here's the docs https://docs.typo3.org/typo3cms/TSconfigReference/8.7/PageTsconfig/Field/Index.html#setting-default-page-tsconfig – god_is_love May 15 '18 at 18:45
  • 1
    as you found: you always give the fileextension. so you could use anything, but to be clear for the next one to inspect the code (that might be you in a year) stay with conventions and use some meaningful names. and `.tsconfig` is a convention since 8.7 (see [->ref](https://docs.typo3.org/typo3cms/CoreApiReference/8.7/ExtensionArchitecture/FilesAndLocations/)) – Bernd Wilke πφ May 16 '18 at 06:34