TYPO3

Changing the TYPO3 page title

deutsch Hier klicken, um diese Seite auf Deutsch zu lesen: TYPO3 Seitentitel ändern

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

SETUP
   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.

Comments for Changing the TYPO3 page title

Add a comment


(will not be displayed)


(Fields marked with a * are mandatory)
Please note that your comment will be checked before it gets published.
Aktuelles

Latest TYPO3 tutorial
How to define special links with custom tags

How to define special links with custom tags

September 2010 – How you can define your own tags for specific links in TYPO3. We show tags for nofollow links, links to other languages and links to tt_news records. more

Latest TypoScript snippet
Automated backlink to parent page

Automated backlink to parent page

December 2009 – How to automatically generate a back link to a page one level above the current page. more

Latest glossary entry
File browsers in TYPO3

File browsers in TYPO3

March 2010 – What are file browsers in TYPO3 and how can they be used? more