Records not sorting

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 19, 2010   (RSS)

I have set the sort in "Admin > Section Editors > Sorting" to the address field (lfield3) of our database, but it sorts by table order both in the listings.php and the admin listings page. See here - this should be sorted by address:
http://www.kylandsales.com/listings.php

Re: [orangecat] Records not sorting

By Jason - November 19, 2010

Hi,

If you have dragSortOrder in your section, this will be the default field that is sorted on. Any field you add after dragSortOrder will be sorted second. You can't remove dragSortOrder from the sorting list without first deleting it from the section entirely.

A good way to get around this would be to add this to your getRecords query:

'orderBy' => "lfield3",

Give this a try.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/