[TYPO3-english] How to position a custom page title tag near the top of my head section?

François Suter fsu-lists at cobweb.ch
Thu Jul 15 19:58:35 CEST 2010


Hi Harm,

> Different SEO tools suggest that placing your <title> tag way up in your
> HTML it has some appreciable effect.

Since TYPO3 4.3 there's a HTML that drives the global page rendering. 
This is unfortunately badly documented (mostly because we have no good 
place where to store such an information at the moment).

The template is used by the page rendering class (t3lib_pageRenderer) 
and defines where the major elements are to be placed. The default 
template for the frontend is located in 
typo3/sysext/cms/tslib/templates/tslib_page_frontend.html and contains 
the following:

###XMLPROLOG_DOCTYPE###
###HTMLTAG###
###HEADTAG###

###METACHARSET###
###INLINECOMMENT###

###BASEURL###
###SHORTCUT###
###TITLE###
###META###

###CSS_INCLUDE###
###CSS_INLINE###

###JS_LIBS###
###JS_INCLUDE###
###JS_INLINE###

###HEADERDATA###
</head>
###BODY###
###JS_LIBS_FOOTER###
###JS_INCLUDE_FOOTER###
###JS_INLINE_FOOTER###
###FOOTERDATA###
</body>
</html>

So the solution to your problem would be to copy that template file 
somewhere in your local install, point to it using TypoScript, e.g.

config.pageRendererTemplateFile = path/to/the/file/mytemplate.html

and move the ###TITLE### marker around.

BTW config.pageTitleFirst is not what it may seem to be. By default 
TYPO3 will output the title like:

<title>Site title: Page title</title>

With config.pageTitleFirst = 1 you get:

<title>Page title: Site title</title>

HTH

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-english mailing list