Skip to content
Snippets Groups Projects
Commit 07465f8f authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Added structured data implementation to single view

parent 70484948
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,12 @@ plugin.tx_sgnews {
# How to sort the news in general (date, positionInTree)
sortBy = date
# The publisher value for the structured data implementation (see single view template)
publisher = SGalinski Internet Services
# The logo value for the structured data implementation (see single view template)
publisherLogo = https://cdn.sgalinski.de/fileadmin/media/news/logoWithoutText.png
}
features {
......
......@@ -4,6 +4,30 @@
{namespace rx=Reelworx\RxShariff\ViewHelper}
<f:section name="main">
<f:alias map="{leftBrace: '{', rightBrace: '}'}">
<script type="application/ld+json">
{leftBrace}
"@context": "http://schema.org/",
"@type": "NewsArticle",
"author": "{newsMetaData.news.author}",
"publisher": {leftBrace}
"@type": "Organization",
"name": "{settings.publisher}",
"logo": {leftBrace}
"@type": "ImageObject",
"url": "{settings.publisherLogo}"
{rightBrace}
{rightBrace},
"image": "<f:uri.image absolute="TRUE" image="{newsMetaData.imageObject}" />",
"headline": "{newsMetaData.news.navTitle}",
"description": "{newsMetaData.news.description}",
"dateCreated": "<f:format.date format="Y-m-d">{newsMetaData.news.creationDate}</f:format.date>",
"datePublished": "<f:format.date format="Y-m-d">{newsMetaData.news.creationDate}</f:format.date>",
"dateModified": "<f:format.date format="Y-m-d">{newsMetaData.news.lastUpdated}</f:format.date>"
{rightBrace}
</script>
</f:alias>
<div class="intro-section">
<section class="dark-bg">
<div class="tx-sgnews-single-header {f:if(condition: newsMetaData.imageObject, then: 'tx-sgnews-single-header-image')}">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment