[TYPO3-dev] COA_INT in extension ?

JoH info at cybercraft.de
Fri Sep 15 14:31:25 CEST 2006


>>>> Nothing similar - since you will do exactly the same thing in your
>>>> extensions:
>>> Not really. Even if one executes cObjGetSingle for COA_INT inside
>>> plugin, rest of the system have no idea for it and still will cache
>>> final output.
>>
>> No - I have tested this approach thoroughly and it works perfectly
>> fine. As you can see the whole TS-Array is just transferred inside
>> the userFunc. So it doesn't make any difference if it is created
>> this way or directly inside the PHP code.
>
> Now I see from your code. This is different from what I though. I
> thought you propose typical plugin:
>
> 10 = USER
> 10.userFunc = whatever
>
> and doing everything else inside "whatever". But your given example
> will work, of course. In fact, this example is very good, you may
> want to put it to TER as tutorial extension :)

Even inside a "typical plugin" it will work the same way.
You can create the TS array inside the setup of userFunc and hand it over to
the function or create it directly inside the main function itself as

$conf = array(
    blah
)

the result will still be the same.
The magic lies in the way a COA_INT is handled in class.tslib_content.php.
$content will always be <!--SOME_MARKER--> and gets replaced after fetching
the content from cache.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com






More information about the TYPO3-dev mailing list