Loading...
 
Features / Usability

Features / Usability


How to sort results (dates) from a dynamic tracker field in smarty

posts: 126885 United Kingdom

Hi B

I think you'll need to use the PHP sort function https://www.php.net/sort

You'll need to add it as an allowed php function in the security control panel, and the use it something like (totally untested)

Hmm, but you'll need to turn the string into an array first... try

Copy to clipboard
{$dates = '<br>'|explode:$orderrow.holydaysDays} {$sort($dates)} {'<br>'|implode:$dates}


However... you will also have to change the date format so it sorts correctly, to YYYY-MM-DD - hmm, must be a better way eek

There are no comments at this time.

Upcoming Events

1)  21 Mar 2024 18:00 GMT-0000
Tiki Roundtable Meeting
2)  25 Mar 2024 17:00 GMT-0000
29th anniversary WikiBirthday (With Ward Cunningham)
3)  18 Apr 2024 18:00 GMT-0000
Tiki Roundtable Meeting
4)  16 May 2024 18:00 GMT-0000
Tiki Roundtable Meeting
5)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
8)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9) 
Tiki birthday
10)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting