此 TS 代码始终生成 600x400 像素的图像:
10 = FILES
10 {
required = 1
references {
table = tt_content
fieldName = image
}
renderObj = IMAGE
renderObj {
wrap = <div class="teaser-image">|</div>
file.import.data = file:current:originalUid // file:current:uid
file.crop.data = file:current:crop
file.width=600c
file.height=400c
}
}
如果我删除
file.width=600c
file.height=400c
然后将使用裁剪向导中裁剪的图像。
但我需要两者(它是现有站点的升级):如果可用,则使用裁剪的图像,但如果没有,则使用给定的高度和宽度。
仅在给定的情况下,如何使用“file:current:crop”部分覆盖宽度和高度?或者我如何设置后备?就像是...
file.crop.data = file:current:crop // fallback...