【问题标题】:Backend Layout with Fluidtemplate in TYPO3 V10.4TYPO3 V10.4 中使用 Fluidtemplate 的后端布局
【发布时间】:2021-09-10 14:26:31
【问题描述】:

我试图找出 TYPO3 V10.4 的后端布局发生了什么变化。我有一个站点包扩展,它与 TYPO3 V9.5 及更早版本一起使用,并具有以下打字稿配置:

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

        ...
    }
...

在constants.typoscript中有

## Resource Path
resDir = EXT:wtsitepackage9/Resources

您必须对 V10.4 进行哪些主要更改?我尝试了https://docs.typo3.org/m/typo3/tutorial-sitepackage/master/en-us/TypoScriptConfiguration/Index.html 中的示例,但还没有成功。

【问题讨论】:

    标签: typo3-extensions typo3-10.x


    【解决方案1】:

    上面 FLUIDTEMPLATE 的打字稿配置仍然可用并且可以正常工作。问题出在 sitepackage 扩展的 ext_localconf.php 文件中。

    旧到 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';
    

    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';
    

    更改后后端布局可以再次选择。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-14
      • 1970-01-01
      • 2017-05-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多