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

Tony Lush tlush at advancewm.com
Tue Sep 18 17:41:49 CEST 2012


You can always modify the body tag, instead of duplicating it. For 
instance, if you want to assign the PID to the body tag you could:

page.bodyTag >

page.bodyTagCObject = TEXT
page.bodyTagCObject.field = uid
page.bodyTagCObject.wrap = <body id="|">

Cheers -- Tony

On 9/18/2012 7:59 AM, Christian Weiske wrote:
> 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
>
>



More information about the TYPO3-english mailing list