View Single Post
Old 09-28-2013, 02:57 AM   #4
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,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by gabby98 View Post
FWIW I ended up using

Code:
{#collection:test([Collection] {#collection}/{title}/{title},{author}/{#myseries2}{series}/{series_index:0>2s} {title}/{title})}
That template can break in mysterious ways because it uses subtemplates, something that doesn't work well in single function mode templates. As the documentation says: Do not use subtemplates (`{ ... }`) as function arguments. Instead, use template program mode and general program mode.

I would use general program mode for this. Something like
Code:
program:
	test(
		field('#collection'), 
		template('[Collection] {#collection}/{title}/{title}'),
		template('{author}/{#myseries2}{series}/{series_index:0>2s} {title}/{title}')
	)
chaley is offline   Reply With Quote