Changing the TYPO3 page title (HTML title tag)

This TypoScript code shows you how to extend the HTML title tag of a TYPO3 page.

By default, TYPO3 uses the page title of the current page as the HTML tag <title>. However, sometimes you might want to extend the title tag with additional information. For example, it is more appropriate to use the text 'Infinite Loop Enterprises - Contact' rather than just 'Contact' as the page title.

Change the title tag in TYPO3 TypoScript, SETUP section
# Remove the page title
config.noPageTitle = 1
page = PAGE
page {
# Set a new title tag in headerData
  headerData {
    10 = TEXT
    10 {
      field = title
      noTrimWrap = |<title>Page title: | - text after dynamic title</title>|
    }
  }
}

There is another way to modify the page title: As a backend user with administrator rights, go to the module 'Web > Template' and fill out the field 'Sitetitle'. Note that using this option, you can only put some additional text before the actual page title.

As you can see in the example above, this TypoScript code makes it possible to put any text before as well as after the actual page title. You can also insert other database fields (field) by replacing the expression title in line 9 with a different field name, e.g. subtitle, which will then fetch the subtitle of the page.

The noTrimWrap statement in line 10 makes sure that the whitespaces before and after the inserted page title won't be removed.