[TYPO3-dev] includeJS from frontend plugin

Andreas Wagner andreas.wagner at klee.se
Sun Sep 14 16:28:07 CEST 2008


Hi,

You can use

$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId.'_some_key'] = 
'<script ... />';

Regards,

Andreas

Xavier Perseguers wrote:
> Hello,
> 
> How may I include a JS (in <head>) from my plugin content generation 
> method?
> 
> I do not want to force my users to create a template extension and 
> manually add it whenever they use my plugin on a given page.
> 
> If it's not possible, I'll add a <script> block before my content but it 
> won't be as nice as it will be added once for each of my plugin on that 
> page.
> 




More information about the TYPO3-dev mailing list