Stefan Ernst

Typo3: Decent T3 and ttnews metatags and title tag setup for SEO

Typo3 Backend

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!

Comments

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

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
Are you human?
                                                                                                       





xxxxxxx xxxxxxx wwwwwww wwwww wwwwwww cccccccccccccccc aaaaaaaaaaaaa
x:::::x x:::::x w:::::w w:::::w w:::::w cc:::::::::::::::c a::::::::::::a
x:::::x x:::::x w:::::w w:::::::w w:::::w c:::::::::::::::::c aaaaaaaaa:::::a
x:::::xx:::::x w:::::w w:::::::::w w:::::w c:::::::cccccc:::::c a::::a
x::::::::::x w:::::w w:::::w:::::w w:::::w c::::::c ccccccc aaaaaaa:::::a
x::::::::x w:::::w w:::::w w:::::w w:::::w c:::::c aa::::::::::::a
x::::::::x w:::::w:::::w w:::::w:::::w c:::::c a::::aaaa::::::a
x::::::::::x w:::::::::w w:::::::::w c::::::c ccccccc a::::a a:::::a
x:::::xx:::::x w:::::::w w:::::::w c:::::::cccccc:::::c a::::a a:::::a
x:::::x x:::::x w:::::w w:::::w c:::::::::::::::::c a:::::aaaa::::::a
x:::::x x:::::x w:::w w:::w cc:::::::::::::::c a::::::::::aa:::a
xxxxxxx xxxxxxx www www cccccccccccccccc aaaaaaaaaa aaaa






Enter the code depicted in ASCII art style.