Closed basepack closed 11 years ago
I think I made a type or something because everything works now!
I'm also having this problem. Whatever field I try to sort with using orderby in the pods UI, it only sorts by the 'name' field in ascending order.
I can successfully re-order the fields in the pods UI, and using orderby code in the website itself spits them out in the correct order; the only thing that doesn't seem to be working is choosing a field other than name to order by within the UI page.
I've also tried using 'name DESC', but that doesn't do anything either, it's still presenting in 'name ASC'.
$object->ui = array(
'orderby' => 'displayorder',
'title' => 'Events',
'reorder' => [ 'on' => 'displayorder',
'orderby' => 'displayorder',
],
'reorder_columns' => array(
'name' => 'Name',
'displayorder' => 'Display Order'),
'columns' => array(
'displayorder' => 'Display Order',
'name' => 'Name',
'created' => 'Date Created',
'modified' => 'Last Modified'
),
'add_fields' => $add_fields,
'edit_fields' => $edit_fields
);
Hi all,
I have the following code:
Where 'volgorde' means sort_order in Dutch.
I think this code is correct, like it is explained here: http://lowgravity.pl/blog/introduction-to-podscms-2-0-part-2-pods_ui-parameters/ and here: https://github.com/pods-framework/pods/wiki/Custom-Admin-Menu-UI-Example:-Slideshow
Thanks for your support on this one, cannot see why this is not working. I mean of course the drag&drop functionality.
Edit: I have also created a 'volgorde' Plain Number field in the Pod.