[TYPO3-dev] adding a javascript file so that it is merged with the other ones

Ivano Luberti luberti at archicoop.it
Wed Oct 1 16:15:11 CEST 2014


Anybody has a hint on this?

-------------------------

Hi all, I'm writing an extension that renders FE pages and as part of it
I'm writing a bit of javascript.

I would like to add it only in pages where is needed and I would like to
have it compressed together with the other javascript already compressed
and merged by TYPO3.

I can of course use typoscript includeJS but I should then include in
every page where my plugin is installed.

I have found the pageRendereHook but it adds a new link in a new file

I have tried

$GLOBALS['TSFE']->getPageRenderer()->addJsFile($resolved);

but with same result.

Any suggestion?






More information about the TYPO3-dev mailing list