[TYPO3] Adding JavaScript from TypoScript template

Ricardo Pereira ricardo at tdwg.org
Wed Oct 4 16:13:38 CEST 2006


    Hi all,

    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.

    Sorry about the simple question, but I couldn't find the answer 
anywhere (mailing list archives, sys_template table, various setup.txt 
from installed extensions).

    Thanks,

Ricardo



More information about the TYPO3-english mailing list