[TYPO3-english] Include JavaScript

François Suter fsu-lists at cobweb.ch
Tue Mar 13 17:07:57 CET 2012


Hi,

> I used to use this code in my fe-plugins:
>
> var $extKey   = 'user_t3xxx';    // The extension key.
> $GLOBALS['TSFE']->additionalHeaderData[$this->extKey] = '<script
> src="src_of_the_js"></script>';

The methods pointed to by Kay are better, as the JS files get properly 
included into the rendering process, in particular with regards to 
concatenating and minifying. So it's really recommended and most 
settings exist since 4.3.

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-english mailing list