[TYPO3-english] [Typoscript question]: How to add the page uid to the body tag?

Daniel Doesburg | Doesburg.biz daniel at typo3-nl.eu
Thu Jun 10 00:55:24 CEST 2010


Hi Ries,

Yes this part of typoscript is known.

But now I'm looking for a way to add, as id or class, the "name" of the 
TV template.

The templates are called f1a to f3d.
So the body tag should look like:

The template is the f2c and the page uid is 21.

<body id="f2c" class="pg_21">


Kind regards,

Daniel Doesburg






Op 10-6-2010 0:43, Ries van Twisk schreef:
>
>
>
>
>
>
>
>
>
>
>
> On Jun 9, 2010, at 5:27 PM, Daniel Doesburg | Doesburg.biz wrote:
>
>> Hi Ron,
>>
>> Thanks for this answer. Its not exactly what I'm looking for.
>>
>> I know this method to add a string to the body tag.
>>
>> And so "page.bodyTagAdd = class="class="pg12" is not the problem.
>>
>> But if the page has an uid of 12 than and only than is this correct.
>>
>> But I'm looking for a way to get something like this:
>>
>> page.bodyTagAdd = class="class="pg_{substitute page:id}"
>>
>> And therfor the solutions in the other answers where more or less
>> correct. But in that case I loose the "f1a"-part.
>>
>>
>> Kind regards,
>>
>> Daniel Doesburg
>>
>
>
> Daniel,
>
> are you looking for something like this?
> You basicly need a cObject/stdWrap to do what you want to do,
> bodyTagAdd is just a string...
>
> page.bodyTag >
> page.bodyTagCObject = HTML
> page.bodyTagCObject.value.field = uid
> page.bodyTagCObject.value.wrap = <body class="pg_|">
>
> See :
> http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.3.1/view/1/6/#id2515978
>
>
> Ries
>
> -------------------------------------------------------------------------------------------------
>
> tags: Freelance TYPO3 Glassfish JasperReports JasperETL Flex Blaze-DS
> WebORB PostgreSQL DB-Architect
> email: ries at vantwisk.nl web: http://www.rvantwisk.nl/ skype:
> callto://r.vantwisk
> Phone: +1 (803) 426-3350
>
>



More information about the TYPO3-english mailing list