[TYPO3-mvc] Use index of iteration attribute as array index

Dmitri Pisarev dimaip at gmail.com
Wed Jul 6 13:35:28 CEST 2011


Whoa, Claus, it's kind of funny we ran into the same problem almost 
simulaneously. I need to show a caption for the image inside the foreach 
images loop. I'll also use a wrapper object then.

Sebastian, do you mean Tx_Extbase_Reflection_ObjectAccess? I didn't 
quite get how to use it to write such a ViewHelper.

Regards,
Dmitri.
27.06.2011 11:55, Sebastian Kurfürst пишет:
> Hey,You could give
>
>> {imgSrc.{index}} a try as this would be the logic expression to first
>> substitute index. Your current expression IMO will always look for
>> named property index of imgSrc.
>> [...]
> This won't work, as this kind of expression is not recognized by Fluid.
>
> If you need such (kinda esoteric) expressions, I'd go for a custom
> ViewHelper which wraps Tx_Extbase_Utility_ObjectAccess.
>
> Greets,
> Sebastian



More information about the TYPO3-project-typo3v4mvc mailing list