Search code examples
typo3meta-tagstyposcriptpage-title

Typo3: How to insert the Page Title dynamically into the Description meta tag


Using the Introduction Package 4.5 (Not templa voila)

The page.meta template sets the meta tag 'description' in Setup:

page.meta {
description = {$plugin.meta.description}
}

. . . and the description string value is defined in the root template Constant:

plugin.meta {
description = description string goes here
}

But now how do I dynamically include each Page Title in the Description meta tag? Something like

 description = {plugin.meta.description}{pageTitle.value} ?

Any clues will be appreciated.


Solution

  • To put this in a single line you could use .dataWrap on description like this:

    page.meta.description.dataWrap = {$plugin.meta.description} - {field:title}