[Typo3-dev] enableFields + sorting

Jan-Hendrik Heuing [netfielders] jh at netfielders.de
Sat Jul 5 13:24:08 CEST 2003


Well, via this way you are flexible: If you change TCA, your scripts work as
they should... If you've got sorting enabled, you will have sorting enabled
in your sql-statements in 99% of the cases (Actualy I don't know of any
situation where you would not need it straight away).

Having it seperated, you can use it if you like or not... ;-)

jh

"Luite van Zelst" <luite at aegee.org> schrieb im Newsbeitrag
news:mailman.1057362661.20356.typo3-dev at lists.netfielders.de...
> 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