Feature #83863

Add language property for references of FILES cObject / levelmedia

Added by Ben Robinson 3 months ago. Updated 3 months ago.

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

0%

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

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

History

#1 Updated by Ben Robinson 3 months ago

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

#2 Updated by Ben Robinson 3 months ago

  • Category set to Localization

Also available in: Atom PDF