TypoScript from backend to extension

04. Mai 2022TypoScript

In old setups there is often a lot of TypoScript and also backend template definitions stored in the backend. There are several advantages to keep TypoScript Code in a config extension instead of the backend alias database:

Here we have a short summary of code to move and what can be removed:


// Remove, domains are handeld in site configuration now
config.baseURL = http://hostname/

// move to setup.typoscript and replace with @import
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:zwbisdrei_config/Configuration/TypoScript/plugins.txt">

Page TS

Move all backend template definitions from backend to your config extension in Configuration/TSconfig/BackendLayouts/[Default].tsconfig and import in page.tsconfig with @import 'EXT:zwbisdrei_config/Configuration/TSconfig/BackendLayouts/*.tsconfig.

Also move PageTS code from page settings to the extension in Configuration/TSconfig/Page/page.tsconfig and registerPageTSConfigFile in Configuration/TCA/Overrides/page.php.