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}" />
Copied!
Output:
<meta property="og:title" content="TYPO3 is awesome" />
Copied!
Force the attribute "name"
Code:
<n:metaTag name="keywords" content="{newsItem.keywords}" />
Copied!
Output:
<meta name="keywords" content="news 1, news 2" />
Copied!