[TYPO3-core] RFC: #16228: [Feature] TCA tree
Steffen Kamper
info at sk-typo3.de
Tue Nov 2 19:36:13 CET 2010
Hi,
this is a SVN patch request.
Type: Feature
BT Reference: http://bugs.typo3.org/view.php?id=16228
Branches: trunk
This feature renders a tree from TCA with the type "select" and
renderMode "tree".
It uses the abstract tree classes, adds special tca tree classes and
work with a minimum of configuration needed. it supports all properties
that select supports.
It use an additional config parameter "treeConfig" which has following
options:
parentField => the field where the parent id is defined
childField => the field where the child id is defined
appeareance => array:
expandAll => expands all nodes on show
showHeader => boolean, the header consists of a filter text with
options, and icons for collapse/expand all
if size is defined, the tree height allow to show this amount of nodes
if autoSizemax is defined, it shows at least this amount of nodes before
showing scroll bar
Please unzip the attached archive in typo3/sysext
For testing use the fe_groups field of pages, add the following to you
extTables.php:
$GLOBALS['TCA']['pages']['columns']['fe_group']['config']['renderMode']
= 'tree';
//$GLOBALS['TCA']['pages']['columns']['fe_group']['config']['size'] = '6';
//$GLOBALS['TCA']['pages']['columns']['fe_group']['config']['autoSizeMax']
= '10';
$GLOBALS['TCA']['pages']['columns']['fe_group']['config']['treeConfig']
= array(
'parentField' => 'subgroup',
'appearance' => array(
'expandAll' => TRUE,
'showHeader' => TRUE,
)
);
Notes:
This patch was mainly developed by Steffen Ritter at T3CSS10 and
finished as teamwork.
Please remind that the example with fe_groups is only a showcase and not
a real life example, as fe_froups allow to apply more than one parents,
while a tree node only can have one parent node.
The 2 icons are pending in HCI tracker and will be reviewed or renewed
by them.
vg Steffen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 16228_extjs_tcatree.diff
Type: text/x-patch
Size: 95262 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101102/0cfffe43/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icons.zip
Type: application/zip
Size: 1687 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101102/0cfffe43/attachment-0001.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tree.png
Type: image/png
Size: 8717 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101102/0cfffe43/attachment-0001.png>
More information about the TYPO3-team-core
mailing list