[TYPO3-core] RFC: Bug #6237: Hook request for Web>Page plugin "additional info" display

Franz Holzinger franz at fholzinger.com
Thu Aug 30 12:26:03 CEST 2007


Hello Ernesto, 

> The key (list_type) is included in the $row information that is passed
> along. I can imagine an extension that wants to replace "CODE:" by
> something else in the complete TYPO3 setup with something more
> meaningful (like extracting certain info from flexform, or just
> displaying nothing, or displaying "configured by flexform" or whatever
> makes sense). 
> 
> But I agree that it should be possible to setup just handling your
> specific list_type, which is what each extension will then be able to
> do, as the extension knows best its own plugin setup. 
> 
> So I propose v2 of the patch, which enables handling specific keys, but
> also enables some extension to handle all keys that are not being
> handled elsewhere (_DEFAULT).

I have inserted these lines into the tt_products ext_localconf.php file: 

if ($TYPO3_CONF_VARS['EXTCONF'][TT_PRODUCTS_EXTkey]['useFlexforms'])	{
	// replace the output of the former CODE field with the flexform
	$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.p 
hp']['list_type_Info'][5][] = 
'EXT:'.TT_PRODUCTS_EXTkey.'/hooks/class.tx_ttproducts_cms.php:&tx_ttproducts 
_cms->pmDrawItem';
} 

The function for the test is:
/**
* Draw the item in the page module
*
* @param	array		parameters
* @param	object		the parent object
* @return	  string
*/ 

function pmDrawItem(&$params, &$pObj)	{
	return 'This is output from tt_products';
} 

$params['row']['pi_flexform'] gives the needed info. 

This works fine and can be very flexibly improved inside of extension. 

+1 

. Franz 

 

 

 





More information about the TYPO3-team-core mailing list