Can somebody pls. explain to me how the Attachment list at the bottom of each page is sorted?
For example, this is the order of attachments on my page:
(Please take notice of the third attachment. I cannot figure out why it is at that place, because it was posted much later (excludes order by date). Order by file name could be excluded also if you look at the last three attachments)
PostedBy: xxx on 19/12/2008 (119kb )
PostedBy: xxx on 19/12/2008 (112kb )
PostedBy: xxx on 12/01/2009 (108kb )
PostedBy: xxx on 19/12/2008 (111kb )
PostedBy: xxx on 19/12/2008 (124kb )
The problem is that in a photo album the photos are shown in the very same (undefined?) order. I need to fix this asap. I've seen in the code that the document attachments (unsorted?) are taken and processed with a foreach loop. Can somebody please explain me how I can sort the collection by date before the loop is entered?