[TYPO3-core] RFC: C#6859 Clean up/Feature of db_new.php. Adding flexible newWizards

Malte Jansen mail at maltejansen.de
Wed Dec 5 00:26:58 CET 2007


Hi!

This is an SVN patch request.

Type: Clean up / Feature

Bugtracker references:
http://bugs.typo3.org/view.php?id=6887

Branches:
Trunk

Problem:
The new-record-listing (db_new.php) is very static and with many tables 
bulky. An other point is that the wizards are hardcoded. So it very 
difficult to add or change somesthing.
The TS-function 'newPageWiz.overrideWithExtension' is not implemented.


Solution:
With this patch you can config newWizards via $TCA[table]['newWizards'].
For details check out the txt-files and the examples under Notes


Notes:
db_new.php is now PHP5 conform. There was several lines of double-code etc.
.
The patch also includes the changes for moving the pages- and 
tt_content-wizards to their $TCA.

I have not include 'newPageWiz.overrideWithExtension' because now you 
can change override it via TCA and it was not implemented. 
newContentWiz.overrideWithExtension could be marked as outdated and 
removed in a later version.


Here is a simple Example to get a clue:
$TCA['tt_content']['newWizards'] => array(
	0 => array(
		'type' => 'wizard',
		'label' => 'LLL:EXT:lang/locallang_misc.xml:clickForWizard',
		'icon' => 'gfx/new_record.gif',
		'path' => 
t3lib_extMgm::extRelPath($_EXTKEY).'layout/db_new_content_el.php',
	),
);

Now it's pretty easy to group Tables of an extension (e.g. tt_new):
In this example the Kategorie is a Subentry of the main table...
$TCA['tt_news']['newWizards'] = array(
	0 => array(
		'path' => 'table',
		'table' => 'tt_news_cat',
	)
);
$TCA['tt_news_cat']['hideNewTable'] = 1;



Cheers,

Malte


More information about the TYPO3-team-core mailing list