Yes, that clearly is the hard part. And I punted on that by only displaying configuration. I would expect the sort property to point to something that could be used in sortsub or someplace similar, although I haven’t dug into it carefully. For instance, a full-name sorter might look like this:
\procedure by-full-name() [{!!last-name}] [{!!first-name}] +[join[, ]] +[lowercase[]]
and I might use it like this:
<<list-links filter:"[tag[Person]!sortsub:string<by-full-name>]" >>
Just so you know, this was not the impetus for my looking at my own version. Instead, I wanted to be able to sort on multiple fields, first sort by highest → lowest priority, and then by date, descending. But as far as I went was the logic to use clicks on the headers to set a field with the list of sorts applied:
| click-action | sort-by field |
|---|---|
| (initial) | (none) |
| title | title |
| date | title date |
| date | title !date |
| title | !date title |
| date | title date |
| date | title !date |
| priority | title !date priority |
I don’t know if I even saved that code, but I was going to use that sort-by field to change the sorting on these clicks. In that final step, the sort would look like
[my[filter]sort[title]!sort[date]sort[priority]]
Looking at it again today, a few days later, and I realize that I should probably have three states for each field, so a field starts in don’t-sort, goes to sort-ascending on a click, goes to sort-descending on a second, then back to don’t-sort on a third, and it would simply be removed from the list of sort-fields.
That, if completed, might be a useful extension to the technique linked to in the Thanks for Shiraz thread. But when I realized that I might also want numeric sorting, or multi-field presentation, I spent a few minutes contemplating it, and put it aside. Perhaps I will look again in the next few days.