From 349e65d093b50a9ed156f03c32b9796265029d8d Mon Sep 17 00:00:00 2001 From: David Mellen Date: Tue, 30 Apr 2024 08:28:45 +0200 Subject: [PATCH] feat: use seo title if og or twitter titles are empty --- Configuration/TypoScript/Page/Meta.typoscript | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Configuration/TypoScript/Page/Meta.typoscript diff --git a/Configuration/TypoScript/Page/Meta.typoscript b/Configuration/TypoScript/Page/Meta.typoscript new file mode 100644 index 0000000..191e386 --- /dev/null +++ b/Configuration/TypoScript/Page/Meta.typoscript @@ -0,0 +1,22 @@ +lib.meta { + fields { + ogTitle { + stdWrap.ifEmpty.cObject { + field = seo_title + stdWrap.ifEmpty.cObject = TEXT + stdWrap.ifEmpty.cObject { + field = title + } + } + } + twitterTitle { + stdWrap.ifEmpty.cObject { + field = seo_title + stdWrap.ifEmpty.cObject = TEXT + stdWrap.ifEmpty.cObject { + field = title + } + } + } + } +}