[Typo3] Input for a plugin

René Schade schade at hypergenic.com
Thu Jun 30 11:39:28 CEST 2005


Hi,

If I create a plugin, and I want the plugin to be able to read som arguments, I do this by extending tt_content. Doing this using the kickstarter I get:

##### ext_tables.php ##### 
<?php
if (!defined ("TYPO3_MODE"))     die ("Access denied.");

if (TYPO3_MODE=="BE")    {
        
    t3lib_extMgm::addModule("web","txitevnewsstatus2M1","",t3lib_extMgm::extPath($_EXTKEY)."mod1/");
}

$tempColumns = Array (
    "tx_itevnewsstatus2_test" => Array (        
        "exclude" => 1,        
        "label" => "LLL:EXT:itev_news_status_2/locallang_db.php:tt_content.tx_itevnewsstatus2_test",        
        "config" => Array (
            "type" => "text",
            "cols" => "30",    
            "rows" => "5",
        )
    ),
);


t3lib_div::loadTCA("tt_content");
t3lib_extMgm::addTCAcolumns("tt_content",$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes("tt_content","tx_itevnewsstatus2_test;;;;1-1-1");
?> 
##########################

When the plugin is insertet to a page, I can use the "test" parameter to configure it. This works fine.

But the field is shown on all my pages, even on pages just containing a normal paragraph. This is very confusing for peopel who just wants to write a simple paragrap. 

How do I make sure, that the input-parameter is only shown, whenever the plugin is selected?

Regards,
René

 



More information about the TYPO3-english mailing list