typo3typo3-10.xfluid-styled-content

Access to variables in fluid_styled_content partials


I have cloned the file sysext/fluid_styled_content/Resources/Private/Partials/Media/Type/Image.html into my own template directory and set the constant to use that path. This works fine.

Now I want to output the "source" metadata of the image (which you can edit from the files list or some other places) additionally.

In debug output of {file} I can see this data under the branch {file.originalFile.metaDataAspect.source}.

But if I want to use this data to output there comes an error message Cannot access private property TYPO3\CMS\Core\Resource\File::$metaDataAspect.

How can I access this data in my modified fluid_styled_content template?


Solution

  • The data are stored inside the properties of an array not(!) shown by <f:debug>{filereference}</f:debug>.

    The data come from the system extension "filemetadata". One can access the file metadata by using {filereferce.properties.source} or any other detail you want. You can get a list of all provided properties by using <f:debug>{filereference.properties}</f:debug>

    Source: Using FAL in the Frontend