如何从具有FAL和流畅性的图像中提取元数据属性? [英] How can I extract metadata properties from images with FAL and fluid?

查看:118
本文介绍了如何从具有FAL和流畅性的图像中提取元数据属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sysext:filemetadata已激活;图片(参考资料)存放在页面资源(pages.media)中.

sysext:filemetadata is activated; images (fal references) are deposited within page resources (pages.media).

2个选项:

  1. 使用自定义FAL viewhelper
  2. 使用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_referencesys_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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆