我有 3 个图像(内容对象):
tempProjectImage = IMAGE
tempProjectImage {
file{
#Nur der erste Eintrag.
import.listNum = 0
#Datei wird aus DAM gelesen
import.cObject = USER
import.cObject {
userFunc = tx_dam_tsfe->fetchFileList
refField = project_picture
refTable = tx_nmshowroom_items
}
width = 298
height = 200
}
altText.field = title
titleText.field = title
params = class="previewImage"
}
tempItemImage = IMAGE
tempItemImage {
file{
#Nur der erste Eintrag.
import.listNum = 0
#Datei wird aus DAM gelesen
import.cObject = USER
import.cObject {
userFunc = tx_dam_tsfe->fetchFileList
refField = images
refTable = tx_nmshowroom_items
}
width = 298
height = 200
}
altText.field = title
titleText.field = title
params = class="previewImage"
}
custImage = IMAGE
custImage {
file{
#Nur der erste Eintrag.
import.listNum = 0
#Datei wird aus DAM gelesen
import.cObject = USER
import.cObject = USER
import.cObject {
userFunc = tx_dam_tsfe->fetchFileList
refField = images
refTable = tx_nmshowroom_customers
refUid.field = tx_nmshowroom_customers
}
width = 298
height = 200
}
altText.field = title
titleText.field = title
params = class="previewImage"
}
在我的 HTML 模板中,我有
###IMAGE###
我想做的是一种多重覆盖:
如果 tempItemImage 为空,则显示 tempProjectImage,如果 tempProjectImage 也为空,则显示 custImage。
我开始:
image < .customers.custImage
image.file.import.override.cObject < .tempProjectImage.file.import.cObject
这非常有效。但是当我添加另一个覆盖时:
image < .customers.custImage
image.file.import.override.cObject < .tempProjectImage.file.import.cObject
image.file.import.override.cObject < .tempItemImage.file.import.cObject
它不起作用了。tempItemImage(如果存在)永远不会覆盖其他图像。
我究竟做错了什么?
在此先感谢,戴维德