[TYPO3-english] [Typoscript question]: How to add the page uid to the body tag?
Karl Wallace
karl.wallace at roomthree.com
Wed Jun 9 16:38:21 CEST 2010
You can set the values of the body tag using the following typoscript.
page.bodyTag = <body class="your-class-here">
You can use this in the root TS setup or create an extension template for
the page where the change is required.
If you want to dyanmically add the page ID into the class name you would
first have to use typoscript to construct the object. I found this link
which might help, though I couldnt get it working on my test site.
http://blog.chandanweb.com/typo3/dynamically-change-class-attribute-of-body-tag-using-typoscript
But Sebastian is correct, it's not allowed to have two ID values for one
element.
Karl
"Sebastian Michaelsen" <sebastiangebhard at hoch2.de> wrote in message
news:mailman.1.1276092898.18503.typo3-english at lists.typo3.org...
> Am 09.06.10 16:05, schrieb Daniel Doesburg | Doesburg.biz:
>> Hi,
>>
>> I use the TV Framework of Ron Hall.
>> Every body tag has the mnemonic of the template as id
>>
>> P.E. <body id="fa1">
>>
>> Now I want to add a second id, with the uid of the page, to this tag
>>
>> P.E. <body id="fa1" id="page_12">
>>
>> How can I do that with typoscript?
> Even though that's not your question..
>
> You are not allowed to assign two IDs to one Tag in HTML.
> Generally a Tag can have each attribute only once.
>
> Consider using classes instead.
>
> Kind regards,
> Sebastian
More information about the TYPO3-english
mailing list