Sort page attachments by a gallery's order attribute.
Returns a new array (the shared PageFileData list from the page
context is never mutated). Rules:
name / name desc: code-point comparison of the filename; desc
flips the comparison. Names are unique per page, so no tie-break.
created_at / created_at desc: files with createdAt come first,
compared numerically (desc flips only this comparison); equal
timestamps tie-break on name ascending (also under desc). Files
without createdAt always sort last, keeping their given order.
Sort page attachments by a gallery's
orderattribute.Returns a new array (the shared PageFileData list from the page context is never mutated). Rules:
name/name desc: code-point comparison of the filename;descflips the comparison. Names are unique per page, so no tie-break.created_at/created_at desc: files withcreatedAtcome first, compared numerically (descflips only this comparison); equal timestamps tie-break on name ascending (also underdesc). Files withoutcreatedAtalways sort last, keeping their given order.