View Single Post
Old 10-17-2017, 06:57 AM   #43
vjjustin
Enthusiast
vjjustin began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Sep 2017
Device: Kobo Glo HD
Quote:
Originally Posted by davidfor View Post
I was afraid you were going to ask that

I'll have to answer properly from home tonight. But, the manual for the template language is at https://manual.calibre-ebook.com/template_lang.html. And https://www.mobileread.com/forums/sh...d.php?t=100949 has a lot of examples that could help. I'd be looking at something with either "contains" or "strcmp".
Thank you, 'lookup' did the trick.

If anyone interested, this is what I use,
Code:
{#folder1:lookup(Non Fiction, , authors)}
I have a custom column folder1 with fiction/nonfiction (You could use collections as well most probably). Lookup will return nothing if it is nonfiction else it will return author name.

Complete save template
Code:
Books/{#folder1}/{#folder2}/{#folder3}/{#folder4}/{#folder1:lookup(Non Fiction, , authors)}/{series:re(([^\s])[^\s]+(\s|$),\1)}  {series_index:0>2s|| - } {title}
vjjustin is offline   Reply With Quote