?sort=s | (that is, sorted by size, smallest first) |
?rev=1 | (reversed, but no field specifier, so in my case, sorted Z-A by name) |
?rev=1&sort=s | (sorted by size, biggest first) |
(fourth click gives no sort code, so in my case, sorted A-Z by name) | |
?sort=s | ( cycle repeats... ) |
?sort=s | (that is, sorted by size, smallest first) |
?rev=1&sort=s | (sorted by size, biggest first) |
?sort=s | ( and repeat... ) |
{.set|sortlink| {:<a href="{.trim|
{.get|url|sort=$1| {.if| {.{.?sort.} = $1.} | rev={.not|{.?rev.} .} /if.} /get.}
/trim.}">{.!$2.}{.if| {.{.?sort.} = $1.} | &{.if|{.?rev.}|u|d.}arr;.}</a>:} .}
<th>{.^sortlink|n|Name.}{.^sortlink|e|.extension.}
<th>{.^sortlink|s|Size.}
<th>{.^sortlink|t|Timestamp.}
<th>{.^sortlink|d|Hits.}