Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typo3 基于布局的打字稿覆盖_Typo3_Typoscript_Typo3 7.6.x - Fatal编程技术网

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