Custom list output - how to enable sorting?

anne1979 21 Apr, 2016
Hello to you all,

Anne again🙂
If you are display a CC v5 list with a custom output e.g. using divs instead of tables, how can one hook up onto the sorting mechanism? The fields are defined in "Settings">"Sortables", when I use the standard table output sorting works fine.

I would like to be able to sort my data using my custom output, too.

And thanks again for your help,
Anne
GreyHead 21 Apr, 2016
Answer
1 Likes
Hi Anne,

I'm not sure how your display is working but I can add a sortable column head in a Custom Listing by adding e.g. content.id:content.id in the Sortables box and {content.id} in the Header box - I then get the Title linked to content.id and the sorting arrows.

You could also add manual links including the sort order in the URL e.g.
http://my_domain.com/index.php?option=com_chronoconnectivity5&cont=lists&act=index&ccname=test_content_list&orderfld=content.id&orderdrc=asc

Bob
anne1979 21 Apr, 2016
Hi Bob,

thanks - it works fine if I use {ModelID.fieldname} in the Headerbox. CC v5 uses the column title defined in columns list as output then. Like that!

Anne
This topic is locked and no more replies can be posted.