[Typo3-dev] add bodytag-params through own ext

Ingo Schommer lists at chillu.com
Thu Jan 13 00:32:41 CET 2005


hi again!

jep, the hardcoded string was just for testing purposes.
you're right with namespacing the init()-method, but it's a 
non-public-ext that's not likely to be mixed with other stuff.

cc_vscroller works! i looked through it's code, and did *exactly*
the same thing...without any result. I even evaluated the relevant parts 
in tslib_pagegen.php positively (if-array-conditions).
perhaps it's the way I include my extension: both with typoscript and as 
a content-element (on the same site).
i have absolutely no clue...

greets
ingo


kay stenschke wrote:
> Hello Ingo,
> 
> Please try: $this->prefixId
> instead of: "txfhdmediamap"
> 
> code:
> 
> $GLOBALS["TSFE"]->JSeventFuncCalls["onload"][$this->prefixId]="init();";
> 
> or maybe have a look into the 'Text f/x: blend effects'-extension
> (ext-key: text_fx) i used this code over there.
> 
> regards,
> kay
> 
> ----------------- original Message: ---------------- 
> 
>>hi!
> 
> 
>>thanx for your quick replies. somehow the methods don't work out...
> 
> 
>>I inserted the following into my main()-method:
>>// add onload into body-tag:
> 
> $TSFE->bodyTagAdd = 'onload="init();"';
> 		
> 
>>//add onload-function:
> 
> $GLOBALS["TSFE"]->JSeventFuncCalls["onload"]["txfhdmediamap"]="init();";
> 
> 
>>the bodytag shows up with <body bgcolor="FFFFFF">
> 
> 
>>troubleshooting that i've already done:
>>- didn't include a template-specific bodytag via templavoila
>>- didn't specify a page.bodyTag-Typoscript
> 
> 
>>I also took a glance at cc_vscroller, but it didn't help either. 
>>typo3-version is 3.7.0. is this feature documented somewhere?
> 
> 
>>greets
>>ingo
> 
> 
>>kay stenschke wrote:
>>
>>>Hi Ingo,
>>>
>>>Please try this:
>>>
>>>// add function to be called by 'onLoad' into header:
>>>// (have $jsCode contain your javaScript-Code)
>>>$TSFE->additionalHeaderData ['your_extension_key']= $jsCode;
>>>
>>>// add onload into body-tag:
>>>$TSFE->bodyTagAdd= 'onload="your_function();"';
>>>
>>>//ad onload-function:
>>>$GLOBALS["TSFE"]->JSeventFuncCalls["onload"][$this->prefixId]="your_function();";
>>>
>>>Regards,
>>>Kay
>>>
>>
>>_______________________________________________
>>Typo3-dev mailing list
>>Typo3-dev at lists.netfielders.de
>>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
> 
> 
> ----------------------------------------------------
>   
> 




More information about the TYPO3-dev mailing list