"/>
  简体   繁体   中英

Use of protected media properties in page ressources (TYPO3 8.7.4)

I have an image file in the page properties and I can't find a way to use the properties of the file reference because they are all protected.

<f:debug>{data.media}</f:debug>

Not every attribute must be in the debug. If you look into the FileReference class you can see that there are several getters for different fields.

In PHP you do:

$title = $myFileReference->getTitle();
$description = $myFileReference->getDescription();

In Fluid you do:

{fileReference.title}
{fileReference.description}

您可以通过{fileReference.originalResource.properties}访问所有属性

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM