[MIGX] - Migxloopcollections sorting question

I am using Migxloopcollections with my MIGx created CMP and I want to sort the data on the front end by what it is looking in back end, like by id or i created.
How can I sort the content on front end?
I am using custom tables.

[[!migxLoopCollection?
    &packageName=`team`
    &classname=`Team`
    &tpl=`team_chunk`
    
]]

According to this page the syntax is

[[migxLoopCollection?
    &packageName=`customPackage`
    &classname=`CustomPackage`
    &tpl=`CustomPackageItem`
    &sortConfig=`[{"sortby":"position","sortdir":"ASC"}]`
]]
1 Like
 &sortConfig=`[{"sortby":"position","sortdir":"ASC"}]`

Thisa worked … Thank you!!
How or where can I find more sort options?

What else do you need to know?

“sortby” is the name of a column of your table.
“sortdir” is the direction. ASC for ascending and DESC for descending.
If you want to sort by multiple columns, then add more objects to the &sortConfig array.

1 Like

This is what im asking for. Thank you. Again. :slight_smile:

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.