[TYPO3] Adding JavaScript from TypoScript template

Dmitry Dulepov dmitry at typo3.org
Wed Oct 4 16:28:07 CEST 2006


Hi!

Ricardo Pereira wrote:
>    How can I add some JavaScript to the head section of a web page from 
> a TypoScript template? More specifically I want to add this code:
> 
> <script type="text/javascript">
> <!--
>    fireOnload( function() {
>        restoreTreeState("nav","pageUid123");
>    });
> //-->
> </script>
> 
>    In the case above, the string 123 (in pageUid123) is to to be 
> replaced by the page UID of the current page.

Not possibl to add such thing to head without extension. However you can 
add this inside <body> with simple HTML object.

-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)



More information about the TYPO3-english mailing list