2
votes

I've started a new project with TYPO3 CMS 8.7 LTS and I've created my own distribution- (or provider-) extension for TypoScript, TSconfig and HTML-Templates -- like usual.

At the new Install Tool there's a check: TCA in ext_tables.php check

Extensions change TCA in ext_tables.php
Check for ExtensionManagementUtility and $GLOBALS["TCA"].

I've read, that the ext_tables.php should be (nearly) empty. So my file only contains the link to my static typoscript file:

<?php
if (!defined('TYPO3_MODE')) {
    die ('Access denied.');
}

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Distribution Extension');

That's all. But why is the Install-Tool-Check not successful?

I've also read, that this command should be in typo3conf/ext/distribution_ext/Configuration/TCA/Overrides/sys_template.php, but If I try, I can't choose my distribution in backend (root template -> include static template) ..?

What is the perfect way to include static template files in TYPO3 8.7?

1

1 Answers

3
votes

Putting the ExtensionManagementUtility::addStaticFile() call into Configuration/TCA/Overrides/sys_template.php is correct, but keep in mind to clear your system caches (the red lightning) afterwards.

Also keep in mind that $_EXTKEY is unavailable in that file, use your extension key in a string instead.

Example:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('distribution_ext', 'Configuration/TypoScript', 'Distribution Extension');