1. Fabrik 3.8 has been released. As usual, we strongly recommend that you backup your site (using Akeeba) before upgrading. Report any issues in the forums, we will answer promptly.

Sorting data

Aug 17, 2014
Sorting data

  • Front end users (top)

    You can sort data in the table "view" by clicking on the underlined (clickable) name of that particular column. In order to be able to sort the designer of the form should have enabled first this option for that particular column (element) - see below.

    There is a 3 state sorting:

    1. Unsorted - no little arrow at the right of the column name
    2. Sorted ascending - a little down arrow at the right of the column name
    3. Sorted descending - a little up arrow at the right of the column name
    By clicking the column name, you cycle through these 3 sorting options.


    You can sort on several columns, any combination of ascending and descending, the most important sorting criteria is the leftmost.

    Back end designers (top)

    In the column's (element's) properties, the "Table settings" tab from the right, the "Allow ordering" option should be set to "Yes". In order for the column to be visible in the table view the "Show in table" option should be set to "Yes". [link to the element properties article]


    Ordering With The Querystring (top)

    You can effect the default ordering of the list by appending:

    Code (Text):

    &order_by={full_element_name]&order_dir=desc
     
    Replace {full_element_name} with the element name and you can specify the order_dir as either desc or asc.

    You can also specify multiple orders, with a comma separated list of values

    Code (Text):

    &order_by={element1},{element2}&order_dir=desc,asc