Section Editor sort by list label

5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 22, 2013   (RSS)

By kitsguru - April 18, 2013

Hi,

I have a table that has a list field (generated from another table). I want to sort the list page in the Builder by the list label. The list already displays the label. Clicking on the column title sorts the list by the value not the label This is somewhat counter intuitive as I would expect the column to sort by the displayed label not a hidden value. One might even consider this a bug. :)

Is there a way to control this in the Section Editor Sorting tab?

I don't have an issue with the viewer as I simply do a leftjoin and set my own order by there.

Jeff Shields

By kitsguru - April 19, 2013

Hi Dave,

Isnt the list sorted using javascript when you click on the column heading? Since you already have the value and label, it should be an easy patch.

Jeff Shields

By Dave - April 22, 2013

Hi kitsguru,

We could do that if there was so few records that they all appeared on one page, but for cases where there are many pages the entire resultset needs to be sorted.  Since that could be many thousands of records it needs to be done in MySQL.

There's no simple or elegant workaround for that one, unfortunately, but one "hack" that's possible is having a plugin that updates another text field with the label so that can be displayed and sorted.

Sorry I can't be of more help with that one.  

Dave Edis - Senior Developer
interactivetools.com

By kitsguru - April 22, 2013

Probably best if I just use the 'title' field in the list and by pass the join altogether. No,point in cloning the title, just use it directly in the list.

Jeff Shields