[TYPO3-dev] adding a javascript file so that it is merged with the other ones
Ivano Luberti
luberti at archicoop.it
Wed Oct 1 22:26:53 CEST 2014
Hi, I have not explained myself it seems: I tired it but I obtain an
additional file minified: it is not merged with the other ones
Il 01/10/2014 16:45, Stephan Großberndt ha scritto:
> So why don't you add conditions in your code to call
> $GLOBALS['TSFE']->getPageRenderer()->addJsFile($resolved);
> only in those cases when you need it?
>
> Am 26.09.2014 um 16:35 schrieb Ivano Luberti:
>> 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
>>
>>
>>
>>
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>
--
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================
More information about the TYPO3-dev
mailing list