I may be wrong on this, I don't believe variations can be done with a basic template.
I have a similar case, and what I did was create a composite column and use a GPM template. Try working off this -- I'm a bit foggy on how to do the 'stuff here' though

:
Code:
program:
if
'cbz' in approximate_formats()
then
'(some stuff here)'
else
'(other stuff here)'
fi
Then just put {#yourcompositecolumn} into the save template field.
For reference, here's my templates:
Code:
program:
# Returns 'Fanfiction/Fandom' for fanfics
if $$#fanficcat then
list_re($tags, ',', '^Fanfiction.(.*)$', 'Fanfiction/\1')
# Returns 'Kobo' for Kobo store books (in the rare case I need to sideload one)
elif '\[Kobo Store\]' in $#kobostatus then
'Kobo Store'
# Returns 'PDF' if PDF is only format
elif $formats == 'PDF' then
'PDF'
# Returns 'Loans' for Loans
elif 'Loans' in $#vls then
'Loans'
# Returns topmost tag for all other books
else
re(sublist($tags, 0, 1, ','), '^(.*?)($|\..*$)', '\1')
fi
Code:
{#kobopath}/{author_sort:sublist(0,1,&)}/{title} - {authors}