[Typo3-dev] enableFields + sorting

Luite van Zelst luite at aegee.org
Sat Jul 5 01:50:32 CEST 2003


Robert Lemke zei:
> Jan-Hendrik Heuing [netfielders] wrote:
>
>> I just added the column sorting to tt_products, changed TCA etc...,
>> BUT: we also have to change the sql-statments. As the "ORDER BY
>> sorting ASC" always depends on the value sorting, I thought it might
>> be a good idea to implement it in the enableFields... I know it is not
>> an enableField straight away, but it would at least make sense to set
>> up a function on top holding enableFields and sorting together...
>
> Hmm, you're right, strictly speaking an ORDER BY statement shouldn't
> take place in the enableFields function . So I'd prefer the latter
> suggestion -
> create a function which combines enableFields and your ORDER BY part. So
> no big deal ...

Hm, basically tslib_pibase provides this functionality, right?
pi_getlistquery or something like that. but adding a function never hurts,
I guess. Personally I always like to be in control of my own sql, though.
For me, the pibase does too much automagically already anyway.
But hey, tastes differ.
But I agree - where enablefields is handy for everyone (it's practically a
coding guideline to use it) the usage of sorting depends on the
implementation of the plugin, so I'd prefer to keep things seperate.

regards, Luite.


-----------------------------------------------
AEGEE-Utrecht - De Europese Studentenvereniging






More information about the TYPO3-dev mailing list