Thursday 1 January 2015

Overwrite title tag with TypoScript

TYPO3 is a powerful CMS that uses its own configuration language called TypoScript. This article does not explain what or how to configure TYPO3. In this case only show you how to override the title tag of a page using TypoScript. To develop this example we used a quite old version of TYPO3: 4.2.14 but this solution is also valid for newer versions. Suppose we want new title "Test", then the TypoScript of our template should be:
config.noPageTitle = 2
page = PAGE
page.headerData.10 = TEXT
page.headerData.10.wrap = <title>Test</title>
In the first line we say that we don't want to print the default title. More info here. In the other 3 lines we change the page header adding our title. I hope you find it useful! Regards!

No comments:

Post a Comment