Stefan Ernst

Typo3: Changing the default doctype

DOCTYPE gibberish pictures are good!

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.

Comments

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?
                                                                               

222222222222222
2:::::::::::::::22
2::::::222222:::::2
2222222 2:::::2
ssssssssss ggggggggg ggggg 2:::::2 nnnn nnnnnnnn
ss::::::::::s g:::::::::ggg::::g 2:::::2 n:::nn::::::::nn
ss:::::::::::::s g:::::::::::::::::g 2222::::2 n::::::::::::::nn
s::::::ssss:::::s g::::::ggggg::::::gg 22222::::::22 nn:::::::::::::::n
s:::::s ssssss g:::::g g:::::g 22::::::::222 n:::::nnnn:::::n
s::::::s g:::::g g:::::g 2:::::22222 n::::n n::::n
s::::::s g:::::g g:::::g 2:::::2 n::::n n::::n
ssssss s:::::s g::::::g g:::::g 2:::::2 n::::n n::::n
s:::::ssss::::::s g:::::::ggggg:::::g 2:::::2 222222 n::::n n::::n
s::::::::::::::s g::::::::::::::::g 2::::::2222222:::::2 n::::n n::::n
s:::::::::::ss gg::::::::::::::g 2::::::::::::::::::2 n::::n n::::n
sssssssssss gggggggg::::::g 22222222222222222222 nnnnnn nnnnnn
g:::::g
gggggg g:::::g
g:::::gg gg:::::g
g::::::ggg:::::::g
gg:::::::::::::g
ggg::::::ggg
gggggg
Enter the code depicted in ASCII art style.