Inspired by this thread (with variable-responsive html tables), I wanted to mock up a shiraz-style dynamic table that does the same things.
But I realized (in mocking up my suggestion) that I was stumped by the sorting needs of @mswho42 — which seem to combine :sortsub-style need (retrieve the value in the stack field, since that value is the basis of sort order) with sortby-style recourse to a separate tiddler (that contains the custom sort order for those values).
For a simpler example, documentation shows how to do
{{{ Friday Monday +[sortby{Days of the Week!!list}] }}}
… But if I have a list of tiddlers each with a day field, how do I get that list to sort based on their day field, but in the custom order? Seems to need a sortsub move, but I’m having trouble getting that play nice with sortby…?
<$vars compare-by-day="[get[day]sortby{Days of the Week!!list}]">
<$list filter="[[Amanda]] [[Jane]] +[sortsub<compare-by-day>]">
{{!!title}} — {{!!day}}
</$list>
The result is
Amanda — Friday
Jane — Monday
but of course I’m hoping to get it the other way `round … (which then should map onto the more complex problem in the other post)