[TYPO3-core] RFC: 0002901: API needed to write HTML tags into the FE header tags directly
Franz Holzinger
franz at fholzinger.com
Fri Mar 17 16:22:25 CET 2006
Hello Dmitry,
thanks for looking on this.
>>>- -1 because $GLOBALS['TSFE']->additionalHeaderData[] exists for this. If
>>>I am wrong or you cannot use it, explain why, please.
>>>
>>>
>>>
>>I am trying to use it of course:
>>
>>
>But I do not understand why one more variable is needed.
>additionaHeaderData is meant to contain HTML already. Why ajax or any
>other extension cannot use:
> $GLOBALS['TSFE']['tx_ajax_pi1-js'] = $xjaxa->getJavaScript();
> $GLOBALS['TSFE']['tx_ajax_pi1-css'] = '<link ... />';
>
>I already tried this in one my private extension, it works!
>
>
>
global $TSFE, $GLOBALS;
...
$GLOBALS['TSFE']['tx_ttproducts-js'] = $code;
Gives the error message:
Fatal error: /Cannot use object of type tslib_fe as array/ in
However
$GLOBALS['TSFE']->additionalHeaderData['tx_ttproducts-js'] = $code;
works.
I have never seen something like this before and cannot find it
documented anywhere.
>I see no reason to have one more variable and set value of this variable
>to another variable later. My main reason for -1 is that TSFE already
>very large. Why to expand it further if it does not give any new
>functionality but just wraps existing?
>
>
Well, maybe there are even other extension programmers who did not know
and read about your solution to this.
>I understand it with JSCode and JSImgCode, it is printed when necessary.
>May be we should have another such solution for ajax or more generic
>solution for optional html, which should be printed sometimes.
>
>
Yes, a solution to this would be fine.
- Franz
More information about the TYPO3-team-core
mailing list