Ramblers-Webs, hosting area and group sites

Run by volunteers for volunteers

Ordering in List function

  • Eric Crichton
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
02 Oct 2018 08:55 #1 by Eric Crichton
Ordering in List function was created by Eric Crichton
I am using the list function for some items
$dir=new RDirectoryList(array(".pdf"));
$dir->listItems("images/PDFs/RecentHistory");

Is there a way of controlling the order in the list?
It appears to be sorting alphabetically on the file name.

In most cases I want the list to be in reverse chronologically. (most recent documents first)
In one case I have preceded the file name by A, B C... to force this.
But that is tedious.
I'd be happy to put the date at the front 2018-10-01 but would need reverse alphabetic.
Are there any parameters to this function or idea how to achieve this.
Thanks

Please Log in or Create an account to join the conversation.

More
02 Oct 2018 09:23 #2 by Ruby Tuesday
Replied by Ruby Tuesday on topic Ordering in List function
Please login to view the answers

Please Log in or Create an account to join the conversation.

  • Eric Crichton
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
02 Oct 2018 09:36 #3 by Eric Crichton
Replied by Eric Crichton on topic Ordering in List function
Please login to view the answers

Please Log in or Create an account to join the conversation.

Time to create page: 1.626 seconds