View Single Post
Old 07-19-2018, 07:44 AM   #7
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,463
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by maddz View Post
OK, I got this send to device template to work:

{#collection}/{author_sort}/{Series}/{Series} {Series_index:||-} {#Subseries} {#Subseries_index:||-} {title_sort} - {authors} {#shortstories:contains(Yes,Short,Long)}

However, there's a problem with multi-author series whereby you may have titles by the lead author, the lead author + someone else, or someone else - you have to go looking in multiple author directories for the complete series. To get round this problem, I have created a custom column called Lead Author {#lead}. But I'm running into problems with replacing {author_sort} with {#lead} if there is a value in the lead column. I've tried using {#lead}:test({#lead},{author_sort}) and {#lead}:ifempty({author_sort}) but neither seem to work as intended - does this functionality work in send to device templates or is it only for column templates?
You cannot use subtemplates in Single Function Mode. To do what you want you must use the field() function in Template Program Mode or General Program Mode. See the documentation for details. And in any event, you shouldn't have the trailing } after #lead.
chaley is offline   Reply With Quote