Attention

TYPO3 v7 has reached its end-of-life November 30th, 2018 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.

There is no further ELTS support. It is recommended that you upgrade your project and use a supported version of TYPO3.

meta

Properties

Property

Data Type

stdWrap

Default

array of key names

string /stdWrap

array of key names

Property:

array of key names

Data type:

string /stdWrap

Description:

To define meta tags.

Use the scheme meta.key = value.

value is the content of the meta tag. If the value is empty (after trimming), the meta tag is not generated.

The key can be the name of any meta tag, for example description or keywords. If the key is refresh (case insensitive), then the http-equiv attribute is used in the meta tag instead of the name attribute.

For each key the following sub-property is available:

httpEquivalent:

If set to 1, the http-equiv attribute is used in the meta tag instead of the name attribute. Default: 0.

Examples:

Simple definition:

meta.description = This is the description of the content in this document.
meta.keywords = These are the keywords.

Fetch data from the keywords field of the current or any parent page:

meta.keywords.data = levelfield:-1, keywords, slide

Make a meta.refresh entry:

meta.refresh = [seconds]; [URL, leave blank for same page]

Usage of httpEquivalent:

meta.X-UA-Compatible = IE=edge
meta.X-UA-Compatible.httpEquivalent = 1

Result:

<meta http-equiv="X-UA-Compatible" content="IE=edge">.

Meta tags with a different attribute name are supported like the Open Graph meta tags:

page {
   meta {
      X-UA-Compatible = IE=edge
      X-UA-Compatible.attribute = http-equiv
      keywords = TYPO3
      og:site_name = TYPO3
      og:site_name.attribute = property
      description = Inspiring people to share Normal
      dc.description = Inspiring people to share [DC tags]
      og:description = Inspiring people to share [OpenGraph]
      og:description.attribute = property
      og:locale = en_GB
      og:locale.attribute = property
      og:locale:alternate {
         attribute = property
         value {
            1 = fr_FR
            2 = de_DE
         }
      }
      refresh = 5; url=https://example.org/
      refresh.attribute = http-equiv
   }
}

They can be used like property used for OG tags in the example. You may also supply multiple values for one name, which results in multiple meta tags with the same name to be rendered.

Result for og:description:

<meta property="og:description"
      content="Inspiring people to share [OpenGraph]" />

See https://ogp.me/ for more information about the Open Graph protocol and its properties.