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

Claus Fassing claus at fassing.eu
Sun Jun 26 10:36:32 CEST 2011


Hello,

I try to use the index of the iteration attribute from ForViewHelper as
array index.

Such as

<f:for each="{Foo}" as="foo" iteration="it">		
  <f:alias map="{index: it.index}">
    <f:image src="{imgSrc.index}" alt="foobar" width="150" />
    <f:debug>{imgSrc.index}</f:debug>
  </f:alias>
</f:for>

imgSrc is an array and I get output from this with static settings
{imgSrc.0}, {imgSrc.1} ...

But not with {imgSrc.index}

The debug output is correct 0, 1 ..


Do I use the wrong syntax, or is there any other way to solve this ?

Greetz, Claus


More information about the TYPO3-project-typo3v4mvc mailing list