1

I use the following syntax in my fluid template to render the media files in news:

<f:for each="{v:content.resources.fal(field: 'fal_media',table:'tx_news_domain_model_news',uid:'{newsItem.uid}')}" as="singleImage">
  <div style="background-image: url({singleImage.url})" class="teaser__image"></div>
</f:for>

German is my default language, English the overlay language. In the English news I have implemented a different media image, but only the German (default) image is shown. How can I render the English media image?

Ralf
  • 65
  • 10

2 Answers2

2

My colleague had the same problem last time and he ended up using this extension: https://packagist.org/packages/stefanfroemken/repair_translation

I'm not sure if there is a better solution at the moment.

By the way, you do not need to use vhs extension to get the images. Better would be to do that in this way:

<f:for each="{newsItem.media}" as="mediaElement">
    <div style="background-image: url({f:uri.image(image:mediaElement)})" class="teaser__image"></div>
</f:for>
mrf
  • 546
  • 3
  • 5
  • Thanks for your hints. But unfortunately it does not work for me (TYPO3 7.6.23 and news 6.3.0). Maybe I'll have to update. – Ralf Jul 03 '18 at 16:15
0

The translation of relations pointing to translated objects in TYPO3 is buggy. This is the bugtracker entry: https://forge.typo3.org/issues/57272 . It is obviously hard to fix for every edge case but the extension mentioned by mrf fixes it for sys_file_references which is the case you are hitting.

Jonas Eberle
  • 2,835
  • 1
  • 15
  • 25