Typo3 基于布局的打字稿覆盖
如何基于布局使用多个替代 单次使用目前的工作原理如下:Typo3 基于布局的打字稿覆盖,typo3,typoscript,typo3-7.6.x,Typo3,Typoscript,Typo3 7.6.x,如何基于布局使用多个替代 单次使用目前的工作原理如下: tt_content.image.20.1 { file.width.override { override = 200c override.if { equals.field = layout value = 1 } } } 但我需要一个不同的宽度覆盖不同的布局值 我想我需要做一些类似这样的错误代码: #does not work tt_content.image.20.1
tt_content.image.20.1 {
file.width.override {
override = 200c
override.if {
equals.field = layout
value = 1
}
}
}
但我需要一个不同的宽度覆盖不同的布局值
我想我需要做一些类似这样的错误代码:
#does not work
tt_content.image.20.1.file.width = CASE
tt_content.image.20.1.file.width {
key.field = layout
1 = TEXT
1.value = 200c
2 = TEXT
2.value = 400c
}
如果必须增强属性,您(几乎)总是可以使用
.cObject
来增强它[1]。所以你可以用这样的方法:
tt_content.image.20.1 {
file.width.override {
override.cObject = CASE
override.cObject {
key.field = layout
1 = TEXT
1.value = 200c
2 = TEXT
2.value = 400c
}
}
}
[1] 这属于核心使用的打字脚本。像插件之类的扩展,userfuncs可能会以自己的方式处理键入脚本,而不符合.stdWrap