[TYPO3-dev] includeJS from frontend plugin
Tapio Markula
tapio.markula at xetpoint.fi
Mon Sep 15 08:58:11 CEST 2008
Xavier Perseguers kirjoitti:
> Hi
>
>>> 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.
>>
>> Check how comments extension does it. Search pi1 code for
>> additionalHeaderData and see how to do it flexibly and without forcing
>> the script.
if you add header data if would be nice to use config - at least
something like disable..., when
if(!$conf['...disable']
$GLOBALS['TSFE']->addit...
It is really important in some situations, that the JS would *NOT* be added!
More information about the TYPO3-dev
mailing list