I just tested your query and it’s almost what I want. It has the downside of duplicating the titles of objects with no subtitle.

However, after tinkering with it a bit, I’ve reached a solution. Replacing parts[0] + "<br>" + link(file.name, slice(parts, -1)) with link(file.name, slice(parts, 0)), I obtain the following, which is exactly what I want.

I preserved the colon in the title by using a special white space character (U+2800) instead as the separator.
Thank you so much for your help! Happy holidays!