Search code examples
typo3-extensionstypo3-10.x

Backend Layout with Fluidtemplate in TYPO3 V10.4


I am trying to find out, what has changed in TYPO3 V10.4 with backend layouts. I have got a sitepackage extension, that was working with TYPO3 V9.5 and earlier with following typoscript configuration:

page.10 = FLUIDTEMPLATE
page.10 {
    partialRootPath = {$resDir}/Private/Partials
    layoutRootPath = {$resDir}/Private/Layouts

    file.stdWrap.cObject = CASE
    file.stdWrap.cObject {
        key.data = levelfield:-1, backend_layout_next_level, slide
        key.override.field = backend_layout

        # Default Template
        default = TEXT
        default.value = {$resDir}/Private/Templates/Grid_12_Template.html

        ## weitere Templates
        pagets__1 = TEXT
        pagets__1.value = {$resDir}/Private/Templates/Grid_12_Template.html

        pagets__2 = TEXT
        pagets__2.value = {$resDir}/Private/Templates/Grid_6-6_Template.html

        pagets__3 = TEXT
        pagets__3.value = {$resDir}/Private/Templates/Grid_8-4_Template.html

        ...
    }
...

In constants.typoscript there is

## Resource Path
resDir = EXT:wtsitepackage9/Resources

What could be the main changings you have to do for V10.4? I tried the examples from https://docs.typo3.org/m/typo3/tutorial-sitepackage/master/en-us/TypoScriptConfiguration/Index.html but didn't get it working yet.


Solution

  • The typoscript configuration for FLUIDTEMPLATE above is still usable and working. The problem sat in the ext_localconf.php file of the sitepackage extension.

    OLD until V9:

    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
        '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/TSconfig/Page.txt">'
    );
    
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
        '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/TSconfig/User.txt">'
    );
    
    $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['custom'] = 'EXT:' . $_EXTKEY . '/Configuration/RTE/Custom.yaml';
    

    New from V10

    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
        '@import "EXT:wtsitepackage/Configuration/TSconfig/Page.txt">'
    );
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
        '@import "EXT:wtsitepackage/Configuration/TSconfig/User.txt">'
    );
    
    $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['custom'] = 'EXT:wtsitepackage/Configuration/RTE/Custom.yaml';
    

    After that changes the backend layout is selectable again.