Typo3: Decent T3 and ttnews metatags and title tag setup for SEO
Taking care of Meta Tags and setting up a decent way to set a page title that is independent from the actual name of the page as it appears in the menu and the breadcrumbs can, sometimes, be quite a challenge in Typo3.
Luckily there is a relatively painless way to do a basic setup along with the metatags extension, which comes with most default Typo3 installations.
First, go along and install/activate the metatags extensions in the Typo3 Extension Manager.
Next, simply put the following fraction of code into your site's Root Template's Setup:
config.noPageTitle = 1 page.headerData.10 = TEXT page.headerData.10.field = subtitle page.headerData.10.wrap = <title>|</title> plugin.meta.global.description = plugin.meta.global.keywords = plugin.meta.flags.useSecondaryDescKey = 0 plugin.meta.flags.alwaysGlobalDescription = 1 plugin.meta.flags.alwaysGlobalKeywords = 1 plugin.meta.flags.DC = 0 page.headerData.999 < plugin.meta
This way, the contents of your page <title> tag will be generate from the subtitle field.
The Meta Description will be pulled out of the Description field and the Meta Keywords from the keywords field.
For getting to input the last two fields you might have to change your page type to Advanced though!
That's basically it.
Now, for making this work with the tt_news single view you'll have to paste the following snippet into an extension template for the page with the single view content element from tt_news:
#
# Page title from tt_news generieren.
#
config.noPageTitle = 1
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>|</title>
page.headerData.10 < temp.newsTitle
#
# Keywords and Description in NEWS SINGLE
#
page.headerData.999 {
local >
local {
description.data = register:newsSubheader
keywords.data = register:newsKeywords
}
}
There you go, pretty titles and meta tags!





...klasse Anleitung. So habe
...klasse Anleitung. So habe ich das auch verstanden. Allerdings erst beim zweiten Mal.
Tipp: Ich habe lonewsseo installiert und mußte die Beschreibung für die Description austauschen, aber diese Hürde sollte zu nehmen sein.
Post new comment