[TYPO3-english] [Typoscript question]: How to add the page uid to the body tag?
Daniel Doesburg | Doesburg.biz
daniel at typo3-nl.eu
Wed Jun 9 17:05:02 CEST 2010
Hi Stephen and Karl,
I think I was not clear enough.
I use the TV framework of Ron Hall. The html-source has already a body
tag in this form:
<body id="f1a">
Now I want to ADD a dynamic id or class
P.E. <body id="f1a" class="pg12">
The type of the TV-template and the uid of the page.
Kind regards,
Daniel Doesburg
Op 9-6-2010 16:38, Karl Wallace schreef:
> 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