[TYPO3-dev] PageRender and USER_INT Plugins

PhillipPons phillippons at googlemail.com
Tue Jun 15 19:50:57 CEST 2010


On 03/16/2010 09:10 PM, Susanne Moog wrote:
> Hey,
>
> Am 14.03.2010 16:03, schrieb Steffen Kamper:
>    
>> Hi,
>>
>> Susanne Moog schrieb:
>>      
>>> Hey Steffen, hey all,
>>>
>>> Am 13.03.2010 19:06, schrieb Steffen Kamper:
>>>        
>>>> Hi Jeff,
>>>>
>>>> yes, that is true. It's because of the render mechanism of INT-objects
>>>> in pagegen, they are rendered after complete page generation using
>>>> placeholder vars which are replaced after.
>>>>
>>>> I don't see an easy workaround for this problem.
>>>>          
>>> as we had to search for a workaround just last week for the exact same
>>> problem here is a short proposal:
>>>
>>> What if you had a certain reserved method name in a plugin that is
>>> called independet of the normal caching mechanism? Like you have a main
>>> method and a main_noCache method that is always called.
>>>
>>> Then you could be shure that for every rendering of the page all
>>> stylesheets are in the pagerenderer array.
>>>
>>> What do you think? Would this be possible?
>>>
>>>        
>>
>> not really. The complete plugin isn't rendered if it's UNT, so how would
>> you extract that data?
>>      
>
> I just had a look how we solved it. We are using this:
>
> $contentHookArr = array(
> 	'user',
> 	'user_int'
> );
> for($u=0; $u<count($contentHookArr); $u++) {
> 	$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClass'][] = array(
> 		strtoupper($contentHookArr[$u]),
> 		'EXT:tuicommonconstants/class.user_common.php:&user_common'
> 	);
> }
> $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output']['common']
> = 'EXT:common/class.user_common.php:&user_common->user_getResFiles';
>
>
> And inside the first hook we call:
> 							$pluginObj->mainNoCache();
>
>
> This is working for all cases (we are actually adding CSS and JS this
> way in TYPO3 4.2.x), but not a really nice solution ...
>
> Best regards

Hi,
is there some news about this topic?? Except the workaround from Susanne?

Thanks for the information.

Cheers
Kjeld




More information about the TYPO3-dev mailing list