Skip to content

Commit

Permalink
[TASK] Use proper method to set meta tags
Browse files Browse the repository at this point in the history
Resolves: ##909
Related: #837
  • Loading branch information
georgringer committed Oct 19, 2019
1 parent b08d530 commit c3fc5f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/ViewHelpers/MetaTagViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ public function render()

if ($useCurrentDomain || (isset($this->arguments['content']) && !empty($this->arguments['content']))) {
$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
$pageRenderer->addMetaTag($this->tag->render());
if ($this->tag->hasAttribute('property')) {
$pageRenderer->setMetaTag('property', $this->tag->getAttribute('property'), $this->tag->getAttribute('content'));
} elseif ($this->tag->hasAttribute('name')) {
$pageRenderer->setMetaTag('property', $this->tag->getAttribute('name'), $this->tag->getAttribute('content'));
}
}
}
}

0 comments on commit c3fc5f7

Please sign in to comment.