Flexform的TYPO3 FAL图像输出

问题描述 投票:0回答:1

我知道这里曾经问过类似的问题,但这只是一种后续问题。

我从Fluid模板内的数据数组中接收到此信息:{data.flexform_imageRight}。在这种情况下返回2243049。我也有这行:<v:uri.image src="2243049" treatIdAsReference="1" />

enter image description here

[当我使用<v:uri.image src="{data.flexform_imageRight}" treatIdAsReference="1" />时,我得到了外胎Could not get image resource for "",但是当使用<v:uri.image src="2243049" treatIdAsReference="1" />(硬编码的数字)时,路径正确显示了。

我知道返回了一个字符串,并且我需要一个整数才能正常工作,但是我开始认为这可能不是问题,因为错误提示将空输入作为src值。

请问有人能揭开我的神秘面纱吗?

typo3 extbase typo3-9.x flexform
1个回答
0
投票

您可以像这样:{data.flexform_imageRight as integer}在Fluid中强制转换变量。

这是文档中隐藏的功能。

© www.soinside.com 2019 - 2024. All rights reserved.