我正在寻找一种方法来获取TypoScript中IMG_RESOURCE对象的绝对路径.由于baseUrl对我来说不是真正的解决方案,所以简单地添加config.baseUrl = example.com并不是我接受的东西.
那么,我怎么能解决这样的事情:
ogimage = FILES
ogimage{
references {
table = pages
uid.data = page:uid
fieldName = tx_csseo_og_image
}
renderObj = IMG_RESOURCE
renderObj {
file.import.data = file:current:publicUrl
file.height < plugin.tx_csseo.social.openGraph.image.height
file.width < plugin.tx_csseo.social.openGraph.image.width
# this needs to be generated with an absolute URL
stdWrap.dataWrap = <meta property="og:image" content="|" />
}
}
Run Code Online (Sandbox Code Playgroud)