Changing the TYPO3 page title
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 information' rather than just 'Contact Information' as the page title.
TypoScript: Change the title tag in TYPO3
1: # Remove the page title 2: config.noPageTitle = 1 3: page = PAGE 4: page { 5: # Set a new title tag in headerData 6: headerData { 7: 10 = TEXT 8: 10 { 9: field = title 10: noTrimWrap = |<title>Page title: | - text after dynamic title</title>| 11: } 12: } 13: }
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.
Read on
Be the first to comment this article!
Visitors found this page by searching for these keywords: