Feature #78347
closedFilesProcessor should support data (especially for level fields)
100%
Description
Currently the FilesProcessor cannot be used to add references from level-fields because it only retrieves data by fieldName and tableName.
It would be nice if the FilesProcessor also supports levelmedia and other level* data options.
That way the processor could be used on a page FLUIDTEMPLATE to render e.g. a slideshow by using levelmedia.
Updated by Wouter Wolters about 8 years ago
- Category changed from Fluid to Fluid Styled Content
Updated by Stefan Froemken about 5 years ago
Today I had the same problem and tried to solve it that way:
20 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 20 { files.cObject = FILES files.cObject { references.data = levelmedia: -1, slide begin = 0 maxItems = 1 renderObj = TEXT renderObj.dataWrap = {file:current:originalUid}, } as = headerimages }
But that way, you don't have any crop information anymore in your FluidTemplate
Stefan
Updated by Stefan Froemken about 5 years ago
In FilesContentObject it is already solved with:
$referencesUidList = $this->cObj->stdWrapValue('references', $conf); $referencesUids = GeneralUtility::intExplode(',', $referencesUidList, true); $fileCollector->addFileReferences($referencesUids);
Updated by Gerrit Code Review about 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62098
Updated by Gerrit Code Review about 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62098
Updated by Stefan Froemken about 5 years ago
OK...with my patch you can do following now:
# Default PAGE object: page = PAGE page.10 = FLUIDTEMPLATE page.10 { dataProcessing { 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 10 { references.fieldName = media references.table = pages as = headerImages } 20 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 20 { references.data = LEVELMEDIA: -1, slide as = otherImages } } templateName = Default layoutRootPaths { 10 = EXT:site_package/Resources/Private/Layouts } partialRootPaths { 10 = EXT:site_package/Resources/Private/Partials } templateRootPaths { 10 = EXT:site_package/Resources/Private/Templates } variables { content < styles.content.get } }
{headerImage} will only contain an image, if there is an image assigned in page properties of current site. No slide possible. {otherImage} will always find an image, as long as you have configures an image on root site.
Would be cool to have that missing Feature/Bugfix in TYPO3 9.5, too.
Stefan
Updated by Gerrit Code Review about 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62098
Updated by Gerrit Code Review about 5 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62098
Updated by Gerrit Code Review almost 5 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62098
Updated by Stefan Froemken almost 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 98f1f28ff2305dbd597bd9d68ff5ab32ad7dc4ca.