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

Ivano Luberti luberti at archicoop.it
Fri Sep 26 16:35:16 CEST 2014


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?




-------- Messaggio originale --------
Oggetto: 	link JS
Data: 	Fri, 26 Sep 2014 16:06:36 +0200
Mittente: 	Maria Marcella Greca <greca at archicoop.it>
A: 	Ivano Luberti <luberti at archicoop.it>



I due link trovati:

https://github.com/JostBaron/typo3-nkhyphenation/blob/master/Classes/Hooks/PageRendererHook.php



Ciao
Marcella







More information about the TYPO3-dev mailing list