History: PluginList sort control block
Source of version: 3
Copy to clipboard
!LIST - sort command __Setting Sort Mode__ Please be warned that sorting is normally based on string. if you are trying to sort by numbers, make sure all your numbers are of the same number of digits. Otherwise 2 will be larger than 12 if doing a string sort. {CODE()} {sort mode="tracker_field_example_asc"} {sort mode="tracker_field_example_desc"} {CODE}or {CODE()} {sort mode="title_asc"} {CODE} If you want to do a numeric sort (such that 12 is larger then 2, use the following instead (from Tiki 8): {CODE()} {sort mode="tracker_field_ticketNumber_nasc"} {sort mode="tracker_field_ticketNumber_ndesc"} {CODE}or often {CODE()} {sort mode="modification_date_ndesc"} {CODE} From Tiki 8, there is also a way to simulate random results when showing a short list. This is of course not compatible with pagination. You have to specify a list of sort modes on irrelevant fields to choose randomly from, for example: {CODE(wrap="1")}{sort mode="randommode" modes="title_asc,tracker_field_example_asc,tracker_field_ticketNumber_nasc, modification_date_nasc"} {CODE}(Note, opposite directions will be added automatically) !!!!All the LIST Plugin commands {toc pagename="PluginList"}