Nowadays, search engine optimization (SEO) is one of the major topics in the internet area.
One aspect in SEO is the page title displayed in the web browser and evaluated by nearly every search engine.
Typo3 as one of the major content management systems in the world wide web provides different opportunities to generate the page title. All with specific advantages and disadvantages.

By default, typo3 palces the site title before the page title in the <title> tag.
While the order of the words in the page title make a big different for search engines, and search result presentation as well, it would be better to first present the page title and use the site title as as suffix.
For example:
<title>My Site : Infos</title>
<title>My Site : News</title>
could be improved to
<title>Infos – My Site</title>
<title>News – My Site</title>

Most Common Way
page.config.noPageTitle = 2
page.headerData.1 = TEXT
page.headerData.1.field = subtitle//title
page.headerData.1.wrap = <title>|&nbsp;-&nbsp;My Site</title>

This works fine as long as you only use simple pages.
As soon as extensions like tt_news enter the game, you will run into problems, because the configuration above always use the subtitle or title field of the page which would not work for tt_news single new view.
In this case, you can use the following setup within an extension template placed on the page containing the single news view:

#
# Page title from tt_news
#

page.config.noPageTitle = 2
temp.newsTitle = COA
temp.newsTitle {
10 = RECORDS
10 {
source = {GPvar:tx_ttnews|tt_news}
source.insertData = 1
tables = tt_news
conf.tt_news >
conf.tt_news = TEXT
conf.tt_news.field = title
}
}
temp.newsTitle.wrap = <title>|&nbsp;-&nbsp;Ellen Kamrad Eventmanagement</title>
page.headerData.1 < temp.newsTitle

#
# Keywords and Description in NEWS SINGLE
#

page.headerData.999 {
local >
local {
description.data = register:newsSubheader
keywords.data = register:newsKeywords
}
}

For the news page you are fine now. But what about other extensions such as cal or others able to automatically adopt your page title?
Even tt_news would be able to place the news item title in the page title.

mf_pagetitle Extension
With this extension, you do not need to block the default page title generation. The extension could be used to automatically add a suffix to the page title instead of the site title as prefix.
Just install the extension from the extension manager and add the following lines to your template setup.

includeLibs.pagetitle = typo3conf/ext/mf_pagetitle/pagetitle.php
plugin.mf_pagetitle.title = {page:title} – My Site
config.titleTagFunction = user_pagetitle_class->changetitle

If you need different page title suffix on a multilanguage website, this can be managed with the standard typo3 language switch facilities:

includeLibs.pagetitle = typo3conf/ext/mf_pagetitle/pagetitle.php
plugin.mf_pagetitle.title = {page:title} – My Site
[globalVar = GP:L = 1]
plugin.mf_pagetitle.title = {page:title} – My Site
[globalVar = GP:L = 2]
plugin.mf_pagetitle.title = {page:title} – Meine Seite
[GLOBAL]
config.titleTagFunction = user_pagetitle_class->changetitle

Typo3 Page Title Optimization

Post navigation


Leave a Reply