gpt4 book ai didi

typo3 - 如何替换数据 = TSFE :sys_language_uid in TYPO3 9 with aspects

转载 作者:行者123 更新时间:2023-12-03 23:36:24 25 4
gpt4 key购买 nike

我们有一个 typescript 配置来告诉 CSS 我们使用的是哪种语言,将一个类添加到带有类名 language-x 的 body 标记中。

由于在 Typoscript 中似乎没有任何关于如何执行此操作的文档,因此我还没有尝试太多来解决这个问题。

为此,我们使用了这个排版:

// Language
30 = TEXT
30 {
data = TSFE:sys_language_uid
noTrimWrap = | language-||
}

这会引发 E_USER_DEPRECATED:

Property $TSFE->sys_language_uid is not in use anymore as this information is now stored within the language aspect

提前致谢。问候托米

最佳答案

从 TYPO3 9.5.3 开始,还可以使用 TypoScript 设置访问当前站点语言配置:

page.10 = TEXT
page.10.data = siteLanguage:navigationTitle
page.10.wrap = This is the title of the current site language: |

page.10 = TEXT
page.10.dataWrap = The current site language direction is {siteLanguage:direction}

See https://docs.typo3.org/typo3cms/extensions/core/latest/Changelog/9.5.x/Feature-86973-TypoScriptGetTextPropertySiteLanguage.html for the detailed documentation about the functionality.

关于typo3 - 如何替换数据 = TSFE :sys_language_uid in TYPO3 9 with aspects,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54195804/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com