我在获取要在流体视图助手中使用的图像 url 时遇到问题:
我的视图助手看起来像这样:
<f:image src="{f:cObject(typoscriptObjectPath:'plugin.tx_contentelements.slidePath', data:'{data.uid}')}" class="slideshow-image" alt="{data.header}" />
我的 TS 看起来像这样:
plugin.tx_contentelements.slidePath = FILES
plugin.tx_contentelements.slidePath {
references {
table = tt_content
uid.data = uid
fieldName = image
}
begin = 0
maxItems = 1
renderObj = IMG_RESOURCE
renderObj {
file {
import.data = file:current:uid
treatIdAsReference = 1
width = 900
}
}
}
问题可能是 uid.data = uid。我在一个例子中看到了这一点,但它似乎对我不起作用。