@blezek , wiIl this help?
I had another reason to want to order by sections, so the solution was using the filepath.
Better to see thread as @bep put me on this track with some other changes.