View Single Post
Old 11-20-2011, 03:39 AM   #2
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,393
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I tried using your template in a custom column and it produced a result, so it isn't clear what your problem is. What problem are you are having? Where are you using that template when it doesn't do whatever you want?

As an aside, you might be better off using something like
Code:
{series:'test($,
template("Knihy/_[[series]]_/[[series_index]].[[title]] ([[author]])"),
template("Knihy/[[author_sort]]/[[title]] ([[author]])"))'}
Expressing the result as a template evaluation seems clearer to me than doing it as a series of concatenated values.

Even better (for me) would be to use general program mode, letting you use {} instead of [[ ]] to bracket field references in the template.
Code:
program:
test(field('series'), 
	template("Knihy/_{series}_/{series_index}.{title} ({author})"),
	template("Knihy/{author_sort}/{title} ({author})"))
chaley is offline   Reply With Quote