View Single Post
Old 02-20-2021, 10:46 AM   #20
norolim
Member
norolim began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2021
Device: none
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?
norolim is offline   Reply With Quote