[TYPO3-mvc] Interresting problem with 'Duplicate variable declariations!'

Toke Herkild th at t3cms.dk
Thu Nov 1 10:09:29 CET 2012


Den 01-11-2012 10:03, Toke Herkild skrev:
> Hi all,
>
> I've a fluid template which is supposed to display some models.
>
> That is the simple part.
>
> the template do the following:
>
> <f:for each="models" as="model">
>    <ul>
>      <f:for each="{model.foo}" as="foo" >
>        <li>{foo}</li>
>      </f:for>
>    </ul>
> </f:for>
>
> The thing is, it works fine for the first iteration, but all other fails
> with: 'Duplicate variable declarations!'
>
> Any ideas anyone ?
>
> Regards,
> Toke Herkild

Hi again,

Just for the fun of it I decided to debug the array, and change variable 
name from foo to bar:

<f:for each="models" as="model">
     <ul>
       <f:debug>{model.foo}</f:debug>
       <f:for each="{model.foo}" as="bar" >
         <li>{bar}</li>
       </f:for>
     </ul>
</f:for>

Only difference was that I got the expected array displayed through the 
f:debug.

Are there a problem with clearing the f:for after completed loop ?

Regards,
Toke Herkild


More information about the TYPO3-project-typo3v4mvc mailing list