Typo3: Changing the default doctype
If you do not like the standard DOCTYPE Typo3 generates for your pages you can easily change it by adding 1-2 lines to your template setup section:
config.doctype
config.xhtmlDoctype
You can set config.doctype to:
"xhtml_trans" for XHTML 1.0 Transitional.
"xhtml_frames" for XHTML 1.0 Frameset.
"xhtml_strict" for XHTML 1.0 Strict.
"xhtml_basic" for XHTML Basic.
"xhtml_11" for XHTML 1.1.
"xhtml_2" for XHTML 2.
"none" if you do not want a DOCTYPE declaration in your frontend pages.
...and config.xhtmlDoctype to:
"xhtml_trans" for XHTML 1.0 Transitional.
"xhtml_frames" for XHTML 1.0 Frameset.
"xhtml_strict" for XHTML 1.0 Strict.
"xhtml_basic" for XHTML Basic.
"xhtml_11" for XHTML 1.1.
"xhtml_2" for XHTML 2.
So for example:
config.doctype = xhtml_trans
config.xhtmlDoctype = xhtml_trans
The XML prologue should automatically be set to XML 1.0.





Post new comment