[TYPO3-dam-devel] RFC #12917: allow alphabetical ordering of categories everywhere by setting $TCA['tx_dam_cat']['ctrl']['default_sortby'] = title
Uschi Renziehausen
typo3news at otherone.de
Tue Jan 5 11:33:48 CET 2010
Hi folks,
This is a SVN patch request.
Type: feature/bugfix
Branches: dam_catedit trunk, dam trunk, dam 1.1
BT ref: http://bugs.typo3.org/view.php?id=12917, http://bugs.typo3.org/view.php?id=12918
Problem: With http://bugs.typo3.org/view.php?id=7654 the possibility to define the sorting field of categories has been
introduced. This was done by setting something like this:
$TCA['tx_dam_cat']['ctrl']['sortby'] = 'title';
This is destructive because when you insert new categories or change the title of a category the system will replace the
contents of your title field with the internal sorting number. Thus we need to use the default_sortby key to order our
categories in the trees. This means that the key sortby has to be unset, because if present, the default_sortby will be
ignored. [1]
Solution:
The attached two patches make dam and dam_catedit respect the $TCA-settings hopefully everywhere. To get an
alphabeticaly ordered by title define the following in $TCA:
t3lib_div::loadTCA(tx_dam_cat);
unset($TCA['tx_dam_cat']['ctrl']['sortby']);
$TCA['tx_dam_cat']['ctrl']['default_sortby'] = 'ORDER BY title';
[1] http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/2/#id4240310
Kind regards, Uschi
More information about the TYPO3-team-dam
mailing list