[TYPO3-templavoila] Adding JS from FCE
Lukas Taferner
lukas at taferner.net
Tue Feb 2 08:42:42 CET 2010
Hi Dmitry,
> Yes. It uses hash to make unique entry if I remember correctly.
>
> It uses the same $TSFE->additionalHeaderData as page header data does. In fact, the same piece of code is used in both cases, so it works identically.
I am afraid this is not correct. I added a<head> Section to the FCE TemplateFile and activated it in the "header parts". When I add the same FCE twice on a page the sourcecode shows the same JS tag twice:
<script src="/fileadmin/javascript/swfobject/swfobject.js <view-source:http://vorlage.lusan-p.at/fileadmin/javascript/swfobject/swfobject.js>"type="text/javascript"></script>
<script src="/fileadmin/javascript/swfobject/swfobject.js <view-source:http://vorlage.lusan-p.at/fileadmin/javascript/swfobject/swfobject.js>"type="text/javascript"></script>
Did I miss something?
Greetings,
Lukas
Am 11.11.2009 09:28, schrieb Dmitry Dulepov:
> Hi!
>
> Ron Hall wrote:
>
>> That's cool. So if an FCE is repeated on the page does it only add the
>> JS in the head once?
>>
> Yes. It uses hash to make unique entry if I remember correctly.
>
> It uses the same $TSFE->additionalHeaderData as page header data does. In fact, the same piece of code is used in both cases, so it works identically.
>
>
More information about the TYPO3-project-templavoila
mailing list