1 | initial version |
To retrieve images from a new field in txnews using sysfile_reference, follow these steps:
<f:for each="{newsItem.relatedFiles}" as="fileReference">
<f:if condition="{fileReference.fieldname} == 'news_image'">
<f:image image="{fileReference}" />
</f:if>
</f:for>
This code loops through all the related files for the news item and checks if the fieldname matches "news_image". If it does, it displays the image using the f:image viewhelper.