Project

General

Profile

Actions

Feature #83863

closed

Add language property for references of FILES cObject / levelmedia

Added by Benjamin Robinson almost 7 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2018-02-12
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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 />
    }
}

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #80149: Remove $GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields']Closed2017-03-06

Actions
Actions #1

Updated by Benjamin Robinson almost 7 years ago

  • Related to Task #80149: Remove $GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields'] added
Actions #2

Updated by Benjamin Robinson almost 7 years ago

  • Category set to Localization
Actions #3

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 if you think we should still work on this, and I will re-open the issue.

All the best and merry christmas!
Benni.

Actions

Also available in: Atom PDF