[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 01:50:54 CEST 2010


Hi Ron,

You're right. As with all things in TYPO3 it's possible in many, many ways.
But I wondered if it was possible the way I described/asked.

I think, I adopt your solution or one or another variant.

All people who have tried to help me, thanks a lot boys and girls!


Kind regards,

Daniel Doesburg




Op 10-6-2010 1:34, Ron Hall schreef:
> Daniel,
>
> If you are trying to use the uid as part of the class than the solution I gave earlier of using bodyTagAdd will not work because it has to take a string and does not have stdWrap properties.
>
> But I wonder if you need to add this to the body tag. You could just write a TEXt object to open a div tag just inside the body tag using stdWrap to put the page uid in either a CSS id or class. You would then close that div just before the closing body tag. Using the framework you would write these items in the preCodeHeader and postCodeFooter libraries.
>
> You would end up with an HTML structure like this.
>
> <body id=f1a>
>      <div id="pg_21">
> ...all the page content
>     </div>
> </body>
>
> You end up with one extra div in the markup but you can use it to target your CSS and JavaScript and you can easily the page uid in that id.
>
> Thanks,
> Ron
>
>
>
>


More information about the TYPO3-english mailing list