[Typo3-dev] Ext with multiple plugins, Q2: passing values to each plugin

Rainer Kuhn kuhn at punkt.de
Mon Jul 5 16:53:02 CEST 2004


Hi all,

as announced in my last posting, here's my second issue concerning an 
extension containing three frontend plugins (pi1, pi2, pi3):

Q2) Passing values from the BE to the extension using multiple plugins:

After integrating one plugin to a page in the BE the user should be able to 
pass the plugin type to the extension. Therefore I extended tt_content with 
a new field called "type" and defined the values for the selector menue in 
kickstarter wizard. After finishing with kickstarter I changed 
ext_tables.php manually and changed the line

t3lib_extMgm::addToAllTCAtypes("tt_content","tx_ptconfvisitors_type;;;;1-1-1");
to:
$TCA["tt_content"]["types"]["list"]["subtypes_addlist"][$_EXTKEY."_pi1"]="tx_ptconfvisitors_type;;;;1-1-1"; 


to make sure that the selectorbox only appears in my extension (as described 
in the howtos). This worked fine with only one plugin in my extension.

Some days ago I started the third plugin for the extension, which is a 
statistics plugin. For this plugin the BE user also should have the 
possibility to choose the stats type when integrating this plugin on a page. 
So I extended tt_content again, now with a field named "stats_type", and 
defined the values for a new selectorbox. I added a line for pi3 in 
exttables.php, so the result was
$TCA["tt_content"]["types"]["list"]["subtypes_addlist"][$_EXTKEY."_pi1"]="tx_ptconfvisitors_type;;;;1-1-1";
$TCA["tt_content"]["types"]["list"]["subtypes_addlist"][$_EXTKEY."_pi3"]="tx_ptconfvisitors_stats_type;;;;1-1-1";

This did not harm the BE functionality for pi1, but I got a problem when 
integrating the statistics plugin (pi3) to a page in the BE: there are both 
selectorboxes (the one for pi1 and for pi3) displayed in the backend, but 
the statistics plugin only should have the one for pi3.

I tried to find some hints for that problem and did some trieswith an 
additional line using "subtypes_excludelist", but It didn't work.

Any hints appreciated - thanks again for your help.

Regards,
Rainer





More information about the TYPO3-dev mailing list