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

Claus Fassing claus at fassing.eu
Sun Jun 26 16:58:49 CEST 2011


Hi Claus,

Am 26.06.2011 16:16, schrieb Claus Due:
> If you already have the image names in the array, you should use the "as" variable name:
> <f:for each="{imgSrc}" as="imageSrc" iteration="it">
> <img src="{imageSrc}" />
> </f:for>

this won't work in my situation cause I already have a loop through my
objects and every entry in my image name array belongs to one of them.
Therefore I needed the index of the iteration.

Well, maybe a complete wrong model. Now I'm using a wrapper object,
which contains my main object, the image name (if available) and a
boolean property to define whether an image is available (for condition).

This works very fine.

Thank you anyway !

Greetz Claus


More information about the TYPO3-project-typo3v4mvc mailing list