[TYPO3-english] FLUID Objectstorage
Dominic Garms
djgarms at gmail.com
Wed Sep 11 05:12:25 CEST 2013
On 10/09/13 20:34, Mitja wrote:
> a code example of what I am trying to do is this:
>
>
> <f:for each="{images}" iteration="imagesIteration" as="image">
> <f:if condition="{imagesIteration.isFirst}">
> <f:then>
> <f:image width="800c" height="600c"
> style="width:100%;" src="{image.image}" alt="" title="" />
> </f:then>
> </f:if>
> </f:for>
>
> I think that the above example might be very slow so I would rather have
> only the first one displayed without the need of a <f:for>.
Did you tried {images.0} if you have an array of objects? You might need
to do $myObject->toArray() in your controller if you have only the query
result object.
Cheers,
Dominic
More information about the TYPO3-english
mailing list