Media
Images and other files are imported into FAL and related to the record, see Import Data from ThueCat.
Which fields the import owns
main_ and
media_ mirror what upstream supplies. Each import rebuilds them:
an image upstream no longer lists has its relation removed.
Images added to these fields by hand are removed by the next import. The relation carries no marker saying where it came from, so an editorial addition cannot be told apart from a leftover of an earlier import.
Use
editorial_ for images maintained in the backend. The import never writes to that
field and never removes anything from it, and its contents are available in the frontend as
editorial.
FAL accessors
A tourist attraction exposes its media as native Extbase FAL relations:
=================== ========================================================= Accessor Meaning
=================== ========================================================= main The
primary image (
main_), a single file
reference. Import-owned.
media Additional images and files (
media_).
Import-owned.
editorial Editorially curated images (
editorial_),
maintained in the backend. Never touched by the import.
=================== =========================================================
A trail exposes its media the same way:
=================== ========================================================= Accessor Meaning
=================== ========================================================= main The
primary image (
main_), a single file
reference. Import-owned.
media Additional images and files (
media_).
Import-owned.
logo The trail's logo (logo), a single file reference.
Import-owned.
=================== =========================================================
Trails have no field for editorially maintained images: every trail media field is rebuilt by the import.
main and logo return a single file reference or none;
media and editorial return a (possibly empty) collection.
Rendering
The FAL relations are rendered with the standard Fluid image view helper, so processing (cropping, scaling) and metadata (copyright, alternative text) are available:
<f:if condition="{attraction.mainImage}">
<figure>
<f:image image="{attraction.mainImage}" />
<f:if condition="{attraction.mainImage.originalResource.properties.copyright}">
<figcaption>{attraction.mainImage.originalResource.properties.copyright -> f:format.htmlspecialchars()}</figcaption>
</f:if>
</figure>
</f:if>
<f:for each="{attraction.mediaFiles}" as="image">
<f:image image="{image}" cropVariant="default"/>
</f:for>