【发布时间】:2019-10-15 21:36:43
【问题描述】:
如何在尝试渲染之前使用f:if查看图像是否存在?
我尝试了以下方法但没有成功:
{f:if(condition: page.files.0, then: ' style="background-image:url({f:uri.image(image:page.files.0, width:300c, height:200c)}"')}
<f:if condition="{page.files.0}">
style="background-image:url({f:uri.image(image:page.files.0, width:300c, height:200c)}"
</f:if>
如果有图像,它会起作用,但在没有图像时会破坏元素。
【问题讨论】:
标签: typo3 fluid typo3-9.x fluid-styled-content