简体   繁体   English

在页面资源中使用受保护的媒体属性 (TYPO3 8.7.4)

[英]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.如果您查看 FileReference 类,您会发现有多个用于不同字段的 getter。

In PHP you do:在 PHP 中,您可以:

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

In Fluid you do:在流体中,您可以:

{fileReference.title}
{fileReference.description}

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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