页面uid如何使用Typoscript条件?

问题描述

我该如何使用条件使用错字在首页和其他3个页面上放置不同的标头数据?

我已经尝试过了:

resolvers += "Hortonworks repository" at "https://repo.hortonworks.com/content/repositories/releases"
resolvers += "Spring repository" at "https://repo.spring.io/plugins-release/"

但是主页输出page { [treeLevel = 0] headerData.20.value = Home Page [END] [page|uid = 1] headerData.20.value = Page 1 [END] [page|uid = 2] headerData.20.value = Page 2 [END] [page|uid = 3] headerData.20.value = Page 3 [END] }

我也尝试过Page 3,但结果相同。

对象浏览器说[globalVar = TSFE:id = X]是无效字符吗?

解决方法

我意识到问题是因为我将条件嵌套在page中。 将它们取出后,一切正常。

,

根据documentation(感谢@BerndWilkeπφ提醒),必须将TypoScript条件放在TS的顶层(任何其他结构的外部 )。

在任何page之类的cObject中都没有,在其他条件下也没有。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...