Typo3 Extension Programming- Insert data into the page header or footer.

You can easily insert any data into the page header (between the <head>-Tags) or right before the closing </body>-Tag, by using the following two arrays:


For example:

$GLOBALS['TSFE']->additionalFooterData['funkyJavascript'] = '<script type="text/javascript">alert("shows when page is ready.");</script>';

Note that additionalFooterData works only in USER-Plugins, not in USER_INT … additionalHeaderData however also works with USER_INT plugins.