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

This is a very important

This is a very important tutorial and good to know for setting up on-site SEO. That's one problem with all kinds of CMS options ... and that's the poor meta data input options for the CMS in the default panels. I know I was merrily blogging for some time before I realized I didn't properly have meta data in my blogs.

Peter Lawlor
Blog: http://www.websitetemplatereviewshq.com

SEO Liverpool

SEO Liverpool

Thanks for this info. It has

Thanks for this info. It has taken me a while but I finally found the answer that I have just spent the last hour looking for.

This website is having

This website is having reliable contents and essential effects on viewers regarding their expectations.This will be a success in this direction very soon.

Because of the above

Because of the above mentioned facts and facilities provided in Drupal all users prefer to use Drupal under a reliable circumstances.I am glad to have this information from you.
Houston SEO Services

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

jjjj
j::::j
jjjj

rrrrr rrrrrrrrr jjjjjjj ppppp ppppppppp vvvvvvv vvvvvvv
r::::rrr:::::::::r j:::::j p::::ppp:::::::::p v:::::v v:::::v
r:::::::::::::::::r j::::j p:::::::::::::::::p v:::::v v:::::v
rr::::::rrrrr::::::r j::::j pp::::::ppppp::::::p v:::::v v:::::v
r:::::r r:::::r j::::j p:::::p p:::::p v:::::v v:::::v
r:::::r rrrrrrr j::::j p:::::p p:::::p v:::::v v:::::v
r:::::r j::::j p:::::p p:::::p v:::::v:::::v
r:::::r j::::j p:::::p p::::::p v:::::::::v
r:::::r j::::j p:::::ppppp:::::::p v:::::::v
r:::::r j::::j p::::::::::::::::p v:::::v
r:::::r j::::j p::::::::::::::pp v:::v
rrrrrrr j::::j p::::::pppppppp vvv
j::::j p:::::p
jjjj j::::j p:::::p
j::::jj j:::::j p:::::::p
j::::::jjj::::::j p:::::::p
jj::::::::::::j p:::::::p
jjj::::::jjj ppppppppp
jjjjjj
Enter the code depicted in ASCII art style.