Skip to content
Snippets Groups Projects
Commit 3b35164f authored by Richard Haeser's avatar Richard Haeser Committed by Frank Naegler
Browse files

[BUGFIX] Make sure a twitter:card metatag is rendered

To get a valid Twitter card, you need to specify the type of card
by setting the twitter:card metatag. The value of this metatag is
now set to summary by default. If this value need to be changed, you
can use the MetaTag API and set the twitter:card property with the
replace option enabled.

Resolves: #88258
Releases: master, 9.5
Change-Id: Iaeaafb2408102c2844623155611cffffa8919d43
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60647


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarGuido Schmechel <guido.schmechel@brandung.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarFrank Naegler <frank.naegler@typo3.org>
Reviewed-by: default avatarGuido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: default avatarRiny van Tiggelen <info@online-gamer.nl>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarFrank Naegler <frank.naegler@typo3.org>
parent 56e4ade4
Branches
Tags
No related merge requests found
......@@ -79,6 +79,13 @@ class MetaTagGenerator
}
}
/*
* Set type of twitter card to summary. This value can be overridden by TypoScript or the MetaTag API by
* using the replace option. In v10 this will be a page property
*/
$manager = $metaTagManagerRegistry->getManagerForProperty('twitter:card');
$manager->addProperty('twitter:card', 'summary');
if (!empty($params['page']['twitter_title'])) {
$manager = $metaTagManagerRegistry->getManagerForProperty('twitter:title');
$manager->addProperty('twitter:title', $params['page']['twitter_title']);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment