I use the following TypoScript to render the og:image
meta tag
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 , og_image, slide
}
This works well and as expected.
But on some pages I set the og:image
meta tag programmatically in a plugin.
That results in the problem that I have multiple og:image
tags in my finished rendered page.
How can I extend the TypoScript above to only act if not already an og:image
tag is set?
//edit
I am on typo3 v10.4
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…