Accessing multiple file references in Fluid

65 Views Asked by At

I'm writing my first Typo3 12 extension. It should deliver a list of colors mainly. There should be some file attachments for every color record. I can attach multiple files. But I can't access them in the view.

I've got this TCA configuration:

'images' => [
    'exclude' => true,
    'label' => 'label',
    'config' => [
        'type' => 'file',
        'allowed' => 'common-image-types'
    ],
],

There are two files added to the only existing record (so, the TCA seems to be correct).
enter image description here

With f:debug I get this result:
enter image description here
This relation will hold only the first file record. Furthermore, this structure could only hold one reference.

Because, a complete data layer is missing. I would expect something like this (foreign example):
enter image description here

Here's the model:
enter image description here

What is happening here?

  • I tried to find different TCA or Model configurations. There is only one.

  • I've checked the file reference records in the database. Looks good.

  • I've tried the same with other file types (downloads). Same result.

I've expected to see an object of objects (two dimensions) and not an single object (one dimension) in Fluid context.

0

There are 0 best solutions below