DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
MetaTagViewHelper¶
ViewHelper to render meta tags
Type: Tag Based
General properties¶
Name: | Type: | Description: | Default value: |
---|---|---|---|
additionalAttributes | array | Additional tag attributes. They will be added directly to the resulting HTML tag. | |
content | string | Content of meta tag | |
forceAbsoluteUrl | boolean | If set, absolute url is forced | |
property | string | Property of meta tag | |
useCurrentDomain | boolean | If set, current domain is used | |
name | string | If set, the meta tag is built by using the attribute name=”” instead of property |
Examples¶
Basic Example: News title as og:title meta tag¶
Code:
<n:metaTag property="og:title" content="{newsItem.title}" />
Output:
<meta property="og:title" content="TYPO3 is awesome" />
Force the attribute “name”¶
Code:
<n:metaTag name="keywords" content="{newsItem.keywords}" />
Output:
<meta name="keywords" content="news 1, news 2" />