A tt_content custom content element (imageslider) has IRRE slides.
The slide record has a title and an image (filereference).
Is it possible to preview the image of the IRRE record?
The previewRenderer
class seems to be oriented only on the page view.
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php
shows a TCA setting for headerThumbnail
However this TCA doesn't produce the headerThumbnail.
'appearance' => [
'headerThumbnail' => [
'field' => 'image',
'width' => '45',
'height' => '45c',
],
So a userFunc or something is needed to retrieve the fileUid for field
? Or is there an easier solution possible?
Nice hint, that there should be custom thumbnails possible...
After diving a bit deeper in InlineRecordContainer
, it seems to be clear, that this can't work (anymore?). There are (in v10/v11) the following lines:
// Renders a thumbnail for the header
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails'] && !empty($inlineConfig['appearance']['headerThumbnail']['field'])) {
$fieldValue = $rec[$inlineConfig['appearance']['headerThumbnail']['field']];
$fileUid = $fieldValue[0]['uid'];
For the UID of the thumbnail, the first array entry in the given field is used. But when debugging $rec
(= $data['databaseRow']
), we see, it is just the raw record, which means a FAL-field will not be an array but only an integer that counts the relations...
IMO this is a bug. I have just reported it: https://forge.typo3.org/issues/96188
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.