[TYPO3-english] Prevent TYPO3 to generate <body> tag

Christian Weiske christian.weiske at netresearch.de
Tue Sep 18 13:59:36 CEST 2012


Hi,


When using TemplaVoila for page generation, you sometimes need to be
able to set classes directly on the body tag from within TemplaVoila.
Thus TV needs to generate the page's <body> tag.

Unfortunately, TYPO3 itself generates the <body> tag, too - so we have
2 body tags in the HTML document. To solve this problem, TYPO3 needs a
way to not generate a <body> tag.

The closest solution we came up with was the following TypoScript:
> page.bodyTag >
> page.bodyTagCObject = TEXT
> page.bodyTagCObject.wrap = <!-- body | -->
This replaces the opening body tag with a HTML comment.
The closing tag is still there, which makes the HTML document invalid.


Is there a way to disable the body tag (opening and
closing) generation in TYPO3?


----

We made a patch in #40986 [1] to introduce a new TS config:
> config.disableBodyTag = 1

This is of course not needed if there is a way to disable the body tag
with existing tools.

[1] http://forge.typo3.org/issues/40986


-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-



More information about the TYPO3-english mailing list