[TYPO3-mvc] f:for inside f:for ?

Stefan Neufeind typo3.neufeind at speedpartner.de
Wed Feb 15 16:16:00 CET 2012

On 02/15/2012 04:05 PM, Stig Nørgaard Færch wrote:
> I have a Log domain model linked to a Person domain model.
> So a Person can have multiple Logs attached.
> In the list view of the Person I would like to be able to fetch the
> belonging log entries.
> And it would be even better if I could decide which ones by a custom
> query. If not, I guess I could limit them by fluid ifs...
> But, I'm not sure exactly how to do this. Still newbie.
> But I did this - which doesn't work:
> **List.html:
> <f:for each="{persons}" as="person">
>     <tr>
>         <td><f:link.action action="show" arguments="{person : person}">
> {person.fullName}</f:link.action></td>
>         <td>
>             <f:for each="{person : logs}" as="log">
>                 {log.actionName}<br/>
>             </f:for>
>         </td>
>     </tr>
> </f:for>

I guess you meant to write

             <f:for each="{person.logs}" as="log">

maybe? Is it the logs-property below a person-object?


More information about the TYPO3-project-typo3v4mvc mailing list