OK, here is what I managed to do, using some ugly coding:
If I use the following as a template:
Code:
{#genre:subitems(0,1)}, {#genre:subitems(1,2)}, {#genre:subitems(2,3)}}
with the following metadata:
Code:
Speculative fiction.Fantasy, Speculative fiction.Science fiction.Steampunk
I get this result:
Code:
Speculative fiction, Fantasy, Science fiction, ,Steampunk
The problem here is that the first item hasn't got a third subitem, so the template returns ", ," in its place. Does anyone know an easy way to get rid of blank subitems? One that will work on Calibre 3.48?