Page.meta ViewHelper <f:page.meta> 

New in version 14.0

Go to the source code of this ViewHelper: Page\MetaViewHelper.php (GitHub).

The Fluid ViewHelper <f:page.meta> allows meta tags to be defined directly within Fluid templates by leveraging TYPO3's MetaTagManager API.

This allows frontend rendering logic—such as Extbase plugins, Fluid-based content elements, or site package templates—to control meta tags (for example descriptions, OpenGraph data, and social media cards) directly in Fluid templates, without requiring custom PHP logic.

Meta tags can be defined and managed directly in Fluid templates, reducing or eliminating the need for additional TypoScript configuration in many common scenarios.

Using the <f:page.meta> ViewHelper 

The following examples demonstrate common use cases for the <f:page.meta> ViewHelper in frontend Fluid templates. They show how meta tags can be defined, extended, and replaced directly in Fluid while integrating with TYPO3's MetaTagManager system.

Set meta tags in a detail view template 

Meta tags can be defined directly in a Fluid template, for example in a detail view that renders a single domain object.

EXT:my_extension/Resources/Private/Templates/Item/Show.html
<f:page.meta property="description">{item.description}</f:page.meta>
<f:page.meta property="og:title">{item.title}</f:page.meta>
<f:page.meta property="og:type">article</f:page.meta>

<h1>{item.title}</h1>
<p>{item.description}</p>
Copied!

Define OpenGraph and Twitter / X Card meta tags 

OpenGraph and Twitter / X Card meta tags can be used to control how pages are displayed when shared on social media platforms.

<f:page.meta property="og:title">My Article Title</f:page.meta>
<f:page.meta property="og:description">Article description</f:page.meta>
<f:page.meta property="twitter:card">
    summary_large_image
</f:page.meta>
Copied!

Use sub-properties for complex meta tags 

Some meta tags, such as image-related tags, support additional sub-properties like dimensions or alternative text.

<f:page.meta property="og:image"
             subProperties="{width: 1200, height: 630,
             alt: 'Article image'}">
    {item.image.url}
</f:page.meta>
Copied!

Define custom meta tag types 

Custom meta tags can be defined by explicitly specifying the meta tag type attribute.

<f:page.meta property="author" type="name">John Doe</f:page.meta>
<f:page.meta property="robots" type="name">
    index, follow
</f:page.meta>
Copied!

Replace existing meta tags 

Existing meta tags with the same property can be replaced explicitly when required.

<f:page.meta property="description" replace="true">
    Override any existing description
</f:page.meta>
Copied!

All examples shown above integrate with TYPO3's MetaTagManager system and respect configured meta tag managers, priorities, and rendering rules. This enables a template-centric approach to managing SEO-relevant meta data that reflects the rendered content accurately.

Arguments of the <f:page.meta> ViewHelper 

property

property
Type
string
Required
1
The meta property name (e.g. "description", "og:title")

replace

replace
Type
bool
Default
false
Replace existing meta tags with the same property

subProperties

subProperties
Type
array
Default
array ( )
Array of sub-properties for complex meta tags (e.g. og:image width/height)

type

type
Type
string
The meta type attribute (name, property, http-equiv). If not set, the appropriate manager will determine the type.