TYPO3 V10.4 中使用 Fluidtemplate 的后端布局
Backend Layout with Fluidtemplate in TYPO3 V10.4
我想知道 TYPO3 V10.4 后端布局发生了什么变化。我有一个 sitepackage 扩展,它与 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 中的示例,但还没有成功。
上面的 FLUIDTEMPLATE 拼写错误配置仍然可用并且有效。问题出在站点包扩展的 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';
更改后端布局后再次可选择。
我想知道 TYPO3 V10.4 后端布局发生了什么变化。我有一个 sitepackage 扩展,它与 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 中的示例,但还没有成功。
上面的 FLUIDTEMPLATE 拼写错误配置仍然可用并且有效。问题出在站点包扩展的 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';
更改后端布局后再次可选择。