Another_Coder
Another_Coder

Reputation: 73

Can I rename setup.txt to setup.ts (and constants) in my TYPO3 Extensions?

In an Extension of TYPO3 I want to rename setup.txt to setup.ts and constants.txt to constants.ts.

What stand for Pro and what for Contra to do this?

Upvotes: 3

Views: 505

Answers (2)

Mathias Brodala
Mathias Brodala

Reputation: 6460

Yes, you can rename these files since the .ts file extension is supported since TYPO3v7.

The benefits depend on your development environment. If you have a plugin which adds syntax highlighting not only based on the file type (e.g. ApplySyntax for Sublime), not much will change. If not, then you can at least tell your environment to treat .ts files as TypoScript.

However, .ts is also not the best option yet since this file extension is already used by quite a few other file types (TypeScript, MPEG-2 transport streams).

That's why you can also use .typoscript starting with TYPO3v8. In the long term every TypoScript file will use this file extension so using .typoscript for TYPO3 version 8 and above is strongly recommended.

Upvotes: 9

Robert Wildling
Robert Wildling

Reputation: 1186

As long as you implement the folder, where the typoscript is located, this shouldn't be a problem.

In ../Configuration/TCA/Overrides/sys_template.php:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('myExt', 'Configuration/TypoScript', 'My Extension TS');

Upvotes: 2

Related Questions