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 Dave - April 19, 2013

Hi kitsguru, 

Unfortunately there's no way to change that currently.  The issue is that the way the codebase has evolved there's no support for automatic joins in the backend yet so those labels are being looked up after the mysql query has been completed.  It is something we want to add, but it's going to take some major rewriting.

We could write you a plugin to hide the sort link for that fieldname if you like (The plugin filter name is: listHeader_displayLabel) so at least it wasn't confusing.  

Sorry about that, let me know if there's anything else I can do to assist.  Thanks!

Dave Edis - Senior Developer
interactivetools.com

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 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