如何从具有FAL和流畅性的图像中提取元数据属性? [英] How can I extract metadata properties from images with FAL and fluid?
问题描述
sysext:filemetadata
已激活;图片(参考资料)存放在页面资源(pages.media)中.
sysext:filemetadata
is activated; images (fal references) are deposited within page resources (pages.media).
2个选项:
- 使用自定义FAL viewhelper
- 使用TypoScript(通常难以辨认并且不易维护)
问题
实际上是什么(TYPO3 7.x和8.x)仅通用/仅核心的解决方案,可以在具有诸如创作者,版权等其他属性(元数据)的流体中渲染此类图像?
Question
What's actually (TYPO3 7.x and 8.x) a common/core-only solution to render such images within fluid with additional properties (metadata) like creator, copyright and so on?
推荐答案
我会尝试下一种方法:
打字稿
page.10 = FLUIDTEMPLATE
page.10 {
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = media
}
}
...
}
流体
<f:for each="{files}" as="file">
<div class="media">
<figure>
<f:media file="{file}" />
<figcaption>
{file.description}<br />
author: {file.properties.creator}<br />
copyright: {file.properties.copyright}
</figcaption>
</figure>
</div>
</f:for>
...
要查找所有可能的sys_file_reference
和sys_file_metadata
属性,只需在<f:for ...</f:for>
内添加<f:debug>{file.properties}</f:debug>
.
To find all possible sys_file_reference
and sys_file_metadata
properties just add <f:debug>{file.properties}</f:debug>
inside the <f:for ...</f:for>
.
这篇关于如何从具有FAL和流畅性的图像中提取元数据属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!