View Single Post
Old 06-06-2011, 07:53 AM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,461
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ElfN View Post
And why does
Code:
{series:'ifempty($,field('#genre:|(|)'))'}{series_index:2s|[|] - }{title:|| - }{author_sort}
only work when series is empty? If I put the prefix and suffix anywhere else I get it for either field (series or genre) when I only want them for genre. The above produces a template error (invalid conversion specification) if the series exists.

Thanks.

ElfN
The series template is using template-program mode, which has different rules from single-function mode. The parameter to field must be a column name and you must be careful where you put the quote that ends the program. I think you want
Code:
{series:'ifempty($,field('#genre'))'|(|)}{series_index:2s|[|] - }{title:|| - }{author_sort}
chaley is offline   Reply With Quote