@Jan Here is at least part of the discussion, TOC-macros Rewritten (+ a lot of new fuctionality) - Part 2 which @pmario just edited. Without reading the details today, at a minimum you can add a different sort in a field of a TOC item, that influences its children.
Of course a TOC is just one example of a hierarchical list. It is possible to write your own using nested $list widgets and impose your own sort order for the tiddlers at each level. This is of course dependant on your data as to how this may work and things such as how many levels deep you need to sort.
- One approach may be to have an outer list widget, that acts on everything with the TableOfContents tag but invokes a TOC for each tiddler therein with that tag, and its own sort field.
This relates to an argument I put quite often, we are all inclined to try and push everything such as a multilevel sort into one filter, perhaps so it fits into a parameter of one lists widget or the TOC macros. But this is not necessary when one can write nested lists for which each level can have its own variable, sort order and display format etc… and if you have an indeterminate number of levels look into writing recursive filters and now functions.