How to change the DocType in the TYPO3 template setup.

config.doctype = xhtml_11
config.xhtmlDoctype = xhtml_11
config.xmlprologue = none
config.xhtml_cleaning = all

The DOCTYPE can be set to these values:

xhtml_trans (XHTML 1.0 Transitional doctype)
xhtml_frames(XHTML 1.0 Frameset doctype)
xhtml_strict (XHTML 1.0 Strict doctype)
xhtml_basic (XHTML basic doctype)
xhtml_11 (XHTML 1.1 doctype)
xhtml_2 (XHTML 2 doctype)
none (NO doctype at all)

The XML prologue can be set to these values:

xml_10 (XML 1.0 prologue)
xml_11 (XML 1.1 prologue)
none (the default XML prologue is not set)

The XHTML cleaning can be enabled by the following values:

all (the content is always processed before it may be stored in cache)
cached (only if the page is put into the cache)
output (only the output code just before it’s echoed out)

Further information about setting the doctype is available in the TSref.

This entry was posted in TYPO3/TypoScript. Bookmark the permalink.

6 Responses to TYPO3: Setting XHTML 1.1 DOCTYPE

  1. Another good idea in this very context is to activate the xhtml cleaning parser. When T3 has rendered the HTML-output of a page this cleaner is going to try to remove non valid xhtml as injected e.g. by non xhtml conform extensions.

    config.xhtml_cleaning = all

    polarizers 2 cent

  2. Peter says:

    But how can i do it in templavoila ?

  3. Pingback: My del.icio.us bookmarks for March 31st through April 6th | B-WORX blog

  4. With TYPO3 4.4.0 you can now use the html5 doctype, like this:

    config.doctype = html_5

  5. @Peter the same code is used for TemplaVoila! :)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.