rtgx

Typoscript: OpenGraph meta tagy z vlastností stránky

TS setup

page.meta {
og:type = website
og:type {
attribute = property
}
og:title {
field = nav_title // title
attribute = property
}
og:description {
field = description // abstract
attribute = property
}
og:url {
stdWrap.cObject = TEXT
stdWrap.cObject {
typolink {
parameter.data = page:uid
forceAbsoluteUrl = 1
returnLast = url
}
}
attribute = property
}
og:image {
stdWrap.cObject = FILES
stdWrap.cObject {
references {
table = pages
uid.data = page:uid
fieldName = media
}
begin = 0
maxItems = 1
renderObj = IMG_RESOURCE
renderObj {
file {
import.data = file:current:publicUrl
width = 400m
}
stdWrap {
wrap = {tsfe:baseUrl}|
insertData = 1
}
}
}
attribute = property
}
}

HTML result

<meta property="og:type" content="website"> 
<meta property="og:title" content="Geld sparen – Tipps für Frauen">
<meta property="og:description" content="Was ist besser: Tagesgeld, Festgeld oder doch...">
<meta property="og:url" content="https://www.sitename.sk/work/finanzen/geld-sparen-tipps-fuer-frauen/">
<meta property="og:image" content="https://www.sitename.sk/fileadmin/_processed_/5/f/csm_...png">
 
Žiadne dokumenty ani odkazy k tejto stránke.