[TYPO3-ttnews] tx_news - display first image if showinpreview is not set
Frans Saris
franssaris at gmail.com
Fri Nov 22 12:51:59 CET 2013
Try
<f:alias map="{mediaElement: newsItem.media.0}">
Gr. Frans
Op 22 nov. 2013 12:42 schreef "BENCH Artwork" <lists at bench-artwork.ch>:
> Hi,
>
> I'm searching for a solution to display the first image in list view if
> showinpreview is not set.
> Something like this won't work:
>
> <f:if condition="{newsItem.mediaPreviews}">
> <f:then>
> <f:alias map="{mediaElement: newsItem.mediaPreviews.0}">
> <f:image
> src="uploads/tx_news/{mediaElement.image}" title="{mediaElement.title}"
> alt="{newsItem.title}" width="300c" height="168c" />
> </f:alias>
> </f:then>
> <f:else>
> <f:alias map="{mediaElement: newsItem.media}">
> <f:image
> src="uploads/tx_news/{mediaElement.image}" title="{mediaElement.title}"
> alt="{newsItem.title}" width="300c" height="168c" />
> </f:alias>
> </f:else>
> </f:if>
>
> Any help?
> _______________________________________________
> TYPO3-project-tt-news mailing list
> TYPO3-project-tt-news at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-tt-news
>
More information about the TYPO3-project-tt-news
mailing list