TypoScript - 仅在尚未设置的情况下才呈现元标记

问题描述

我使用以下 TypoScript 来呈现 og:image标记

page.Meta.og:image = TEXT
page.Meta.og:image {
    typolink {
        parameter {
            cObject = IMG_RESOURCE
            cObject {
                file {
                    import.data = levelfield : -1,og_image,slide
                    treatIdAsReference = 1
                    import.listNum = 0
                }
            }
        }

        returnLast = url
        forceAbsoluteUrl = 1
    }

    attribute = property
    if.isTrue.data = levelfield : -1,slide
}

效果很好,符合预期。
但在某些页面上,我在插件中以编程方式设置了 og:image标记
这导致了我在完成的呈现页面中有多个 og:image 标记的问题。

如何将上面的 TypoScript 扩展为仅在尚未设置 og:image 标记时才起作用?

//编辑 我使用的是typo3 v10.4

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)