[TYPO3-mvc] How to get first object of an 1:n relation -followUp !

Frank Mey - NEW.EGO mey_mailings at newego.de
Fri Apr 15 14:48:33 CEST 2011


Hi,

thx Franz - I tried your solution, but it lists the articles without
properties,
meaning that it iterates and throws no errors, but the fields like
{artikel.artikelTitel} etc.
are left empty. Lazy loading is completely turned off atm.
Any other ideas on how to solve that grouping problem in fluid without
custom queries ?

Have a nice weekend :),
Frank

> -----Original Message-----
> From: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-
> project-typo3v4mvc-bounces at lists.typo3.org] On Behalf Of Franz Koch
> Sent: Friday, April 15, 2011 11:39 AM
> To: typo3-project-typo3v4mvc at lists.typo3.org
> Subject: Re: [TYPO3-mvc] How to get first object of an 1:n relation
-followUp
> !
> 
> Hey Frank,
> 
> ...
> > The showAction in the HeftController ? I'd like them to be grouped by
> > categories, my best guess in Fluid was The groupedFor ViewHelper, like
> > this:
> >
> > <f:groupedFor each="{heft.heftZuArtikel}" as="artikel"
> > groupBy="heftZuArtikel.artikelZuBereich" groupKey="rubrik">
> >
> > But the property "heftZuArtikel.artikelZuBereich" is not accessible.
> 
> Just have a closer look on what you tried. You're looping over
> {heft.heftZuArtikel}, so the looped objects already are of type
> {heftZuArtikel}. And "heftZuArtikel" of course itself doesn't have a
property
> "heftZuArtikel" again. So give the following a try:
> 
> <f:groupedFor each?"{heft.heftZuArtikel}" as="artikel"
> groupBy="artikelZuBereich" groupKey="rubrik">...
> 
> 
> PS: I still find the naming very confusing ;)
> 
> --
> kind regards,
> Franz Koch
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list