Hi all,
Post Summary
Can someone provide a way to display a word in the filename depending on the presence of the tags? Something like :
If one of the tags is "xxx" then add "yyy" if not "zzz"
Detailed post
I am testing the way my books are rendered on my reader.
I need the template to add a special keyword in the filename (actually an extension prefix) when sending to device, depending on the tags I gave:
If one the tags is "kepub" display ".kepub" if not display ""
I didn't succeed with these syntaxes:
- {tags:contains("kepub",".kepub","")}
- {tags:in_list(",","kepub","kepub",".kepub")}
- Notice that there is a syntax with 5 arguments (for the built-in templates) in the template engine. So I tried also: in_list({tags},",","kepub",".kepub","")
Can someone provide examples for those functions using the {tags} as value:- in_list(separator, pattern, found_val, not_found_val) Reference
- contains(pattern, text if match, text if not match) Reference
Resources:
Thank you for your help,
Regards
François