[TYPO3-extbase-kickstarter] Show data from related table
Nicolas de Haen
typo3 at ndh-websolutions.de
Tue Oct 7 07:49:29 CEST 2014
Hi Sacha,
you don't need the uid of the related object. Let's say you have an
object Foo which holds multiple objects of type Bar in a relation called
bars. You assign the result of FooRepository->findAll to the view as
AllFoos. Then you can write in your template:
<f:for each="AllFoos" as="Foo">
{Foo.title}<br />
Bars: <f:for each="Foo.bars" as="Bar">{Bar.title}<br /></f:for>
</f:for>
hope this helps,
regards,
Nico
--
Nico de Haen
ndh websolutions
Webprogrammierung, OpenSource, Typo3
http://www.ndh-websolutions.de
More information about the TYPO3-project-extbase-kickstarter
mailing list