content.resources.fal ViewHelper <vhs:content.resources.fal>
¶
Content FAL relations ViewHelper
Render a single image in a content element¶
We assume that the flux content element has an IRRE file field
<flux:field.inline.fal name="settings.image">
.
The file data can be loaded and displayed with:
{v:content.resources.fal(field: 'settings.image')
-> v:iterator.first()
-> v:variable.set(name: 'image')}
<f:if condition="{image}">
<f:image src="{image.uid}"/>
</f:if>
Image preview in backend¶
To load image data for the "Preview" section in the backend's page view,
you have to pass the record
attribute:
{v:content.resources.fal(field: 'settings.image', record: record)}
Arguments¶
table¶
- DataType
string
- Default
'tt_content'
- Required
false
- Description
The table to lookup records.
field¶
- DataType
string
- Default
'image'
- Required
false
- Description
The field of the table associated to resources.
record¶
- DataType
mixed
- Required
false
- Description
The actual record. Alternatively you can use the "uid" argument.
uid¶
- DataType
integer
- Required
false
- Description
The uid of the record. Alternatively you can use the "record" argument.
as¶
- DataType
string
- Required
false
- Description
If specified, a template variable with this name containing the requested data will be inserted instead of returning it.
asObjects¶
- DataType
boolean
- Required
false
- Description
Can be set to TRUE to return objects instead of file information arrays.