Feature #83863
closedAdd language property for references of FILES cObject / levelmedia
0%
Description
It is already possible to retrieve files from pages|media with slide functionality:
lib.mediaimages = FILES lib.mediaimages{ references.data = levelmedia:-1, slide renderObj = IMG_RESOURCE renderObj{ file.import.data = file:current:publicUrl stdWrap.wrap = |<br /> } }
... but there is no option to set a specific language (mainly default language "0" is needed).
There's a little workaround to get such files from the default language via CONTENT cObject ...
lib.mediaimages = CONTENT lib.mediaimages{ table = sys_file_reference select{ pidInList = this where = tablenames='pages' AND fieldname='media' orderBy = sorting_foreign languageField = 0 selectFields = uid_local } renderObj = FILES renderObj{ files.stdWrap.field = uid_local renderObj = IMG_RESOURCE renderObj{ file.import.data = file:current:publicUrl stdWrap.wrap = |<br /> } } }
... but this does not allow slide functionality.
So it would be nice to have an option to select the references's language of FILES/levelmedia, f.e.:
lib.mediaimages = FILES lib.mediaimages{ references{ data = levelmedia:-1, slide languageField = 0 } renderObj = IMG_RESOURCE renderObj{ file.import.data = file:current:publicUrl stdWrap.wrap = |<br /> } }
Updated by Benjamin Robinson almost 7 years ago
- Related to Task #80149: Remove $GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields'] added
Updated by Benni Mack almost 3 years ago
- Status changed from New to Closed
Hey Ben,
thanks for your feedback.
Sorry to get back to you so late. With TYPO3 v9 (now in ELTS support), we've merged "pages" and "pages_language_overlay" together. The rootline utility (used for "slide") now does properly overlays of languages, and - fields like "pages.media" have the option of "allowLanguageSynchronization". Meaning, you get the right fields for the current language.
I have had the exact same problem a month ago in a TYPO3 v7 installation. We've upgraded to TYPO3 v11 and the issues are now gone.
I do think such an option would be beneficial in some edge-cases, but that would be part of a larger strategy to do proper language handling.
I will close this issue now. Let me know via benni@typo3.org if you think we should still work on this, and I will re-open the issue.
All the best and merry christmas!
Benni.