[TYPO3-mvc] f:for inside f:for ?
Stig Nørgaard Færch
snf at dkm.dk
Wed Feb 15 16:59:00 CET 2012
Den 15-02-2012 16:16, Stefan Neufeind skrev:
> 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?
No - I guess not. I would describe it as the log-object connected to the
person-object (not sure how to describe it with the right terms :-)
There can be any number of log records(? or should I say objects) for
each Person.
If I used {person.logs} , wouldn't that just take a property of person?
/Stig
More information about the TYPO3-project-typo3v4mvc
mailing list