Assets title in fluid

Hi,

how do i get the assets title in fluid templates?

i’ve got a NodeType field defined:

 files:
   type: array<TYPO3\Media\Domain\Model\Asset>
   ui:
     label: 'PDF Files'
     inspector:
       group: 'properties'

in fluid i want to render:

< select>
<f:for each="{files}" as=“file” iteration=“itemIterator”>
< option value="{f:uri.resource(resource: file.resource)}">
{file.resource.title}
</ option>
</f:for>
</ select>

did you try {file.label}?

otherwise try <f:debug>{file}</f:debug> to see what you have available

Oh man thanks a lot!

{file.label} is working fine. Even if i dont have a tittle it gives back the filename.

Anyway, i tried < f:debug> in several ways, it was only giving the Model back like:

< f:debug>{file}< /f:debug>
TYPO3\Flow\Persistence\Doctrine\Proxies_CG_\TYPO3\Media\Domain\Model\Image
or
TYPO3\Flow\Persistence\Doctrine\Proxies_CG_\TYPO3\Media\Domain\Model\Document

<f:debug>{file.resource}</f:debug>
TYPO3\Flow\Persistence\Doctrine\Proxies_CG_\TYPO3\Media\Domain\Model\Resource

so it was hard to find the title property. So you helped me very much!

Thank you!