[Typo3] Extension Kickstarter 'Order By'

Peter Niederlag niederlag at ikd01.de
Wed Mar 30 22:56:32 CEST 2005


Tim Boesenkool schrieb:
> Hey List
> I have created some extensions using the kickstarter. But I'm having
> troubles getting the Order by column to work properly on a simple string
> input (xx/xx/xx). I can get the sort to work when the header is clicked.
> However on initial launch the column I want to Order by doesn't order. 
> In my ext_tables.php I have
>                         "default_sortby" => "ORDER BY eta DESC",  

=> used for BE-purposes

> Is there something in my ._pi1.php that I need to alter?
> // Initializing the query parameters:
> list($this->internal["orderBy"],$this->internal["descFlag"]) =
> explode(":",$this->piVars["sort"]);

=> used in piBase for FE-purposes.
=> assumes some GPVar xy[sort] set

as hint, add:

if ($this->internal["orderBy"]=='') {

[there's probably another class-var for a default-sorting available, 
can't remember]

> Am I close? I could use a hint. Anything that I may be missing?

Be aware that those things mentioned have different scopes(BE vs. FE).

Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
http://www.typo3partner.net * professional services network *

More information about the TYPO3-english mailing list