[TYPO3-dev] How to list plugin as 'typical page content' in wizard?

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Thu Feb 23 14:50:18 CET 2006


Jens Beckmann schrieb:
> Martin Kutschker schrieb:
> 
>> Jens Beckmann schrieb:
> 
> 
>>> I created a frontside plugin with kickstarter an everything works 
>>> fine. When adding new content in the backend, my new plugin now 
>>> appears under "plugins" in the "New Content Element" wizard. Fine, so 
>>> far.
>>>
>>> Now, is there a way to list my plugin under "typical page content" so 
>>> it is easier to find for regular use?
>>
>>
>> If it is a plugin it should stay there. But you can create a new 
>> content type.
> 
> 
> 
> Yes, it should be a new content type, so I changed this in the 
> kickstarter to "Add as a totally new Content Element type". My extension 
> now no longer appears under plugins in the wizard but I can select it 
> from the pulldown-menu "Type:".
> 
> Now, how can I list my new content type in the "typical page content" 
> section in the wizard? Where are the "typical" content types configured?

In ext_tables.php add:

$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_myext_wizicon'] 
= t3lib_extMgm::extPath($_EXTKEY).'class.tx_myext_wizicon.php';

Your class needs some lines likes this:

function proc($wizardItems)	{
	global $LANG;

	$LL = $this->includeLocalLang();

	$res = array();
	foreach ($wizardItems as $key => $item)	{
		if ($key=='special')	{
			$res['kb_conttable_pi1'] = array(
				'icon' => t3lib_extMgm::extRelPath('kb_conttable').'new_el_icon.gif',
				'title' => $LANG->getLLL('tt_content.CType_pi1', $LL),
				'description' => $LANG->getLLL('tt_content.CType_pi1.description', $LL),
				'params' => '&defVals[tt_content][CType]=kb_myext_pi1',
				'tt_content_defValues' => array(
					'CType' => 'myext_pi1',
				),
				);
			}
			$res[$key] = $item;
		}

		return $res;
	}
}

function includeLocalLang()	{
	include(t3lib_extMgm::extPath('kb_conttable').'locallang_db.php');
	return $LOCAL_LANG;
}

Masi




More information about the TYPO3-dev mailing list